Skip to content

Commit

Permalink
Type get_room as possible coroutine
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbrochart committed Jun 19, 2023
1 parent 805777d commit a321f00
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ypy_websocket/websocket_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from contextlib import AsyncExitStack
from inspect import isawaitable
from logging import Logger, getLogger
from typing import Awaitable

from anyio import TASK_STATUS_IGNORED, Event, create_task_group
from anyio.abc import TaskGroup, TaskStatus
Expand Down Expand Up @@ -56,7 +57,7 @@ def started(self) -> Event:
self._started = Event()
return self._started

def get_room(self, name: str) -> YRoom:
def get_room(self, name: str) -> YRoom | Awaitable[YRoom]:
"""Get or create a room with the given name.
Arguments:
Expand Down

0 comments on commit a321f00

Please sign in to comment.