diff --git a/httpcore/_async/connection_pool.py b/httpcore/_async/connection_pool.py index b466dc71..55416891 100644 --- a/httpcore/_async/connection_pool.py +++ b/httpcore/_async/connection_pool.py @@ -349,6 +349,6 @@ async def __aiter__(self) -> AsyncIterator[bytes]: async def aclose(self) -> None: try: if hasattr(self._stream, "aclose"): - await self._stream.aclose() # type: ignore + await self._stream.aclose() finally: await self._pool.response_closed(self._status) diff --git a/httpcore/_models.py b/httpcore/_models.py index bc557606..e15305ee 100644 --- a/httpcore/_models.py +++ b/httpcore/_models.py @@ -441,7 +441,7 @@ def close(self) -> None: "You should use 'await response.aclose()' instead." ) if hasattr(self.stream, "close"): - self.stream.close() # type: ignore + self.stream.close() # Async interface... @@ -480,4 +480,4 @@ async def aclose(self) -> None: "You should use 'response.close()' instead." ) if hasattr(self.stream, "aclose"): - await self.stream.aclose() # type: ignore + await self.stream.aclose() diff --git a/httpcore/_sync/connection_pool.py b/httpcore/_sync/connection_pool.py index 65dfd33c..020893d3 100644 --- a/httpcore/_sync/connection_pool.py +++ b/httpcore/_sync/connection_pool.py @@ -349,6 +349,6 @@ def __iter__(self) -> Iterator[bytes]: def close(self) -> None: try: if hasattr(self._stream, "close"): - self._stream.close() # type: ignore + self._stream.close() finally: self._pool.response_closed(self._status) diff --git a/requirements.txt b/requirements.txt index 79bc3781..9b2f344f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -23,7 +23,7 @@ coverage==6.5.0 flake8==3.9.2 # See: https://github.com/PyCQA/flake8/pull/1438 isort==5.10.1 importlib-metadata==4.13.0 -mypy==0.981 +mypy==0.991 trio-typing==0.7.0 types-certifi==2021.10.8.3 pytest==7.2.0