Skip to content

Commit

Permalink
Adjust type annotations making print arg optional in web.run_app()
Browse files Browse the repository at this point in the history
PR #3690 by @dutradda

Backport to 3.9 to fix #7077.
Upgrade isort 5.11.4 for poetry compatibility fix PyCQA/isort#2077

(cherry picked from commit baddbfe)
  • Loading branch information
dutradda authored and kohtala committed Feb 3, 2023
1 parent 0d93d80 commit 2fd61f9
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ repos:
hooks:
- id: yesqa
- repo: https://github.com/PyCQA/isort
rev: '5.9.3'
rev: '5.11.5'
hooks:
- id: isort
- repo: https://github.com/psf/black
Expand Down
1 change: 1 addition & 0 deletions CHANGES/3690.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Do print argument optional on run_app function
1 change: 1 addition & 0 deletions CONTRIBUTORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ Denis Moshensky
Dennis Kliban
Dima Veselov
Dimitar Dimitrov
Diogo Dutra da Mata
Dmitriy Safonov
Dmitry Doroshev
Dmitry Erlikh
Expand Down
4 changes: 2 additions & 2 deletions aiohttp/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ async def _run_app(
shutdown_timeout: float = 60.0,
keepalive_timeout: float = 75.0,
ssl_context: Optional[SSLContext] = None,
print: Callable[..., None] = print,
print: Optional[Callable[..., None]] = print,
backlog: int = 128,
access_log_class: Type[AbstractAccessLogger] = AccessLogger,
access_log_format: str = AccessLogger.LOG_FORMAT,
Expand Down Expand Up @@ -474,7 +474,7 @@ def run_app(
shutdown_timeout: float = 60.0,
keepalive_timeout: float = 75.0,
ssl_context: Optional[SSLContext] = None,
print: Callable[..., None] = print,
print: Optional[Callable[..., None]] = print,
backlog: int = 128,
access_log_class: Type[AbstractAccessLogger] = AccessLogger,
access_log_format: str = AccessLogger.LOG_FORMAT,
Expand Down

0 comments on commit 2fd61f9

Please sign in to comment.