Skip to content

Commit

Permalink
Relax shutdown_trigger annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
Tinche authored and pgjones committed Nov 1, 2023
1 parent 042fd10 commit 19dfb96
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/hypercorn/asyncio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ async def serve(
app: Framework,
config: Config,
*,
shutdown_trigger: Optional[Callable[..., Awaitable[None]]] = None,
shutdown_trigger: Optional[Callable[..., Awaitable]] = None,
mode: Optional[Literal["asgi", "wsgi"]] = None,
) -> None:
"""Serve an ASGI or WSGI framework app given the config.
Expand Down
2 changes: 1 addition & 1 deletion src/hypercorn/asyncio/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ async def worker_serve(
config: Config,
*,
sockets: Optional[Sockets] = None,
shutdown_trigger: Optional[Callable[..., Awaitable[None]]] = None,
shutdown_trigger: Optional[Callable[..., Awaitable]] = None,
) -> None:
config.set_statsd_logger_class(StatsdLogger)

Expand Down
2 changes: 1 addition & 1 deletion src/hypercorn/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def wait_for_changes(shutdown_event: EventType) -> None:
last_updates[path] = mtime


async def raise_shutdown(shutdown_event: Callable[..., Awaitable[None]]) -> None:
async def raise_shutdown(shutdown_event: Callable[..., Awaitable]) -> None:
await shutdown_event()
raise ShutdownError()

Expand Down

0 comments on commit 19dfb96

Please sign in to comment.