Wrap run()'s "protocol" type annotation in Optional[] (#1869)

As the default is None and the function will determine a sane value
in that case, the correct annotation is "Optional[Type[Protocol]]".
This commit is contained in:
Linus Groh 2020-06-11 19:40:12 +01:00 committed by GitHub
parent 496e87e4ba
commit bedf68a9b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1064,7 +1064,7 @@ class Sanic:
ssl: Union[dict, SSLContext, None] = None,
sock: Optional[socket] = None,
workers: int = 1,
protocol: Type[Protocol] = None,
protocol: Optional[Type[Protocol]] = None,
backlog: int = 100,
stop_event: Any = None,
register_sys_signals: bool = True,