diff --git a/requirements.txt b/requirements.txt index 252f82672..c73c9671a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -17,7 +17,7 @@ flake8==3.9.2 isort==5.10.1 pytest==7.1.2 pytest-mock==3.8.2 -mypy==0.961 +mypy==0.971 types-click==7.1.8 types-pyyaml==6.0.11 trustme==0.9.0 diff --git a/uvicorn/protocols/http/h11_impl.py b/uvicorn/protocols/http/h11_impl.py index 89e550229..905de3de1 100644 --- a/uvicorn/protocols/http/h11_impl.py +++ b/uvicorn/protocols/http/h11_impl.py @@ -400,7 +400,9 @@ def __init__( # ASGI exception wrapper async def run_asgi(self, app: "ASGI3Application") -> None: try: - result = await app(self.scope, self.receive, self.send) + result = await app( # type: ignore[func-returns-value] + self.scope, self.receive, self.send + ) except BaseException as exc: msg = "Exception in ASGI application\n" self.logger.error(msg, exc_info=exc) diff --git a/uvicorn/protocols/http/httptools_impl.py b/uvicorn/protocols/http/httptools_impl.py index d9f294129..715b9e2a0 100644 --- a/uvicorn/protocols/http/httptools_impl.py +++ b/uvicorn/protocols/http/httptools_impl.py @@ -398,7 +398,9 @@ def __init__( # ASGI exception wrapper async def run_asgi(self, app: "ASGI3Application") -> None: try: - result = await app(self.scope, self.receive, self.send) + result = await app( # type: ignore[func-returns-value] + self.scope, self.receive, self.send + ) except BaseException as exc: msg = "Exception in ASGI application\n" self.logger.error(msg, exc_info=exc)