Skip to content

Commit

Permalink
Use Iterable hint instead of Sequence
Browse files Browse the repository at this point in the history
Given that the `FrozenList` type hint is `Union[List[_T], Iterable[_T]]`
the Application middleware type should not restrict to `Sequence` and
support all `Iterable` types.
  • Loading branch information
stj committed Oct 1, 2019
1 parent b74306d commit 72e3142
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aiohttp/web_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class Application(MutableMapping[str, Any]):

def __init__(self, *,
logger: logging.Logger=web_logger,
middlewares: Sequence[_Middleware]=(),
middlewares: Iterable[_Middleware]=(),
handler_args: Mapping[str, Any]=None,
client_max_size: int=1024**2,
debug: Any=... # mypy doesn't support ellipsis
Expand Down

0 comments on commit 72e3142

Please sign in to comment.