Skip to content

Commit 41c2c8f

Browse files
committed
add use_connection hook
1 parent 64c9e82 commit 41c2c8f

File tree

4 files changed

+4
-2
lines changed

4 files changed

+4
-2
lines changed

src/idom/backend/flask.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
from flask_cors import CORS
2323
from flask_sock import Sock
2424
from simple_websocket import Server as WebSocket
25+
from werkzeug.local import LocalProxy
2526
from werkzeug.serving import BaseWSGIServer, make_server
2627

2728
import idom

src/idom/backend/sanic.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
from sanic import Blueprint, Sanic, request, response
1212
from sanic.config import Config
13+
from sanic.models.asgi import ASGIScope
1314
from sanic.server.websockets.connection import WebSocketConnection
1415
from sanic_cors import CORS
1516

src/idom/backend/types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class Connection(Generic[_Carrier]):
5151
"""The current location (URL)"""
5252

5353
carrier: _Carrier
54-
"""How the connection is mediated. For example, a websocket.
54+
"""How the connection is mediated. For example, a request or websocket.
5555
5656
This typically depends on the backend implementation.
5757
"""

tests/test_backend/test_common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import MutableMapping
1+
from typing import MutableMapping, get_type_hints
22

33
import pytest
44

0 commit comments

Comments
 (0)