Skip to content

Commit ba6d2b6

Browse files
committed
add minimal docstrings
1 parent 67a9e68 commit ba6d2b6

File tree

4 files changed

+4
-0
lines changed

4 files changed

+4
-0
lines changed

src/idom/server/flask.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ def run_server():
106106

107107

108108
def use_connection() -> Request:
109+
"""Get the current ``Request``"""
109110
value = use_context(Connection)
110111
if value is None:
111112
raise RuntimeError("No established connection.")

src/idom/server/sanic.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ async def serve_development_app(
6565

6666

6767
def use_connection() -> request.Request:
68+
"""Get the current ``Request``"""
6869
value = use_connection(Connection)
6970
if value is None:
7071
raise RuntimeError("No established connection.")

src/idom/server/starlette.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ async def serve_development_app(
7070

7171

7272
def use_connection() -> WebSocket:
73+
"""Get the current ``WebSocket`` connection"""
7374
value = use_context(Connection)
7475
if value is None:
7576
raise RuntimeError("No established connection.")

src/idom/server/tornado.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ async def serve_development_app(
7373

7474

7575
def use_connection() -> HTTPServerRequest:
76+
"""Get the current ``HTTPServerRequest``"""
7677
value = use_context(Connection)
7778
if value is None:
7879
raise RuntimeError("No established connection.")

0 commit comments

Comments
 (0)