Skip to content

Commit

Permalink
fix: app listeners param typed as Sequence. (#2366)
Browse files Browse the repository at this point in the history
Closes #2348
  • Loading branch information
peterschutt authored Sep 26, 2023
1 parent 0ecb160 commit 461a955
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions litestar/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,9 @@ def __init__(
type_encoders: TypeEncodersMap | None = None,
type_decoders: TypeDecodersSequence | None = None,
websocket_class: type[WebSocket] | None = None,
lifespan: list[Callable[[Litestar], AbstractAsyncContextManager] | AbstractAsyncContextManager] | None = None,
lifespan: OptionalSequence[
Callable[[Litestar], AbstractAsyncContextManager] | AbstractAsyncContextManager
] = None,
pdb_on_exception: bool | None = None,
) -> None:
"""Initialize a ``Litestar`` application.
Expand Down Expand Up @@ -330,7 +332,7 @@ def __init__(
exception_handlers=exception_handlers or {},
guards=list(guards or []),
include_in_schema=include_in_schema,
lifespan=lifespan or [],
lifespan=list(lifespan or []),
listeners=list(listeners or []),
logging_config=cast("BaseLoggingConfig | None", logging_config),
middleware=list(middleware or []),
Expand Down

0 comments on commit 461a955

Please sign in to comment.