]> git.ipfire.org Git - thirdparty/httpx.git/commitdiff
Bump mypy from 0.982 to 1.0.1 (#2611)
authordependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Wed, 1 Mar 2023 17:53:54 +0000 (11:53 -0600)
committerGitHub <noreply@github.com>
Wed, 1 Mar 2023 17:53:54 +0000 (11:53 -0600)
* Bump mypy from 0.982 to 1.0.1

Bumps [mypy](https://github.com/python/mypy) from 0.982 to 1.0.1.
- [Release notes](https://github.com/python/mypy/releases)
- [Commits](https://github.com/python/mypy/compare/v0.982...v1.0.1)

---
updated-dependencies:
- dependency-name: mypy
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
* Remove unused ignores for mypy-1.0.1

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Michael Adkins <michael@prefect.io>
httpx/_content.py
httpx/_transports/default.py
requirements.txt

index 1c450b7595942cb6c169f65272a19f74bd2d8f56..b16e12d954327e7ecd5f05885bb8778a0fbfa047 100644 (file)
@@ -54,10 +54,10 @@ class IteratorByteStream(SyncByteStream):
         self._is_stream_consumed = True
         if hasattr(self._stream, "read"):
             # File-like interfaces should use 'read' directly.
-            chunk = self._stream.read(self.CHUNK_SIZE)  # type: ignore
+            chunk = self._stream.read(self.CHUNK_SIZE)
             while chunk:
                 yield chunk
-                chunk = self._stream.read(self.CHUNK_SIZE)  # type: ignore
+                chunk = self._stream.read(self.CHUNK_SIZE)
         else:
             # Otherwise iterate.
             for part in self._stream:
@@ -79,10 +79,10 @@ class AsyncIteratorByteStream(AsyncByteStream):
         self._is_stream_consumed = True
         if hasattr(self._stream, "aread"):
             # File-like interfaces should use 'aread' directly.
-            chunk = await self._stream.aread(self.CHUNK_SIZE)  # type: ignore
+            chunk = await self._stream.aread(self.CHUNK_SIZE)
             while chunk:
                 yield chunk
-                chunk = await self._stream.aread(self.CHUNK_SIZE)  # type: ignore
+                chunk = await self._stream.aread(self.CHUNK_SIZE)
         else:
             # Otherwise iterate.
             async for part in self._stream:
@@ -107,7 +107,6 @@ class UnattachedStream(AsyncByteStream, SyncByteStream):
 def encode_content(
     content: Union[str, bytes, Iterable[bytes], AsyncIterable[bytes]]
 ) -> Tuple[Dict[str, str], Union[SyncByteStream, AsyncByteStream]]:
-
     if isinstance(content, (bytes, str)):
         body = content.encode("utf-8") if isinstance(content, str) else content
         content_length = len(body)
index dfd274e7bf557f8f88839d5a468a4279fecb9b63..fca7de98d930a24b6ff5d5a12ce6787c7d5acdc7 100644 (file)
@@ -106,7 +106,7 @@ class ResponseStream(SyncByteStream):
 
     def close(self) -> None:
         if hasattr(self._httpcore_stream, "close"):
-            self._httpcore_stream.close()  # type: ignore
+            self._httpcore_stream.close()
 
 
 class HTTPTransport(BaseTransport):
@@ -241,7 +241,7 @@ class AsyncResponseStream(AsyncByteStream):
 
     async def aclose(self) -> None:
         if hasattr(self._httpcore_stream, "aclose"):
-            await self._httpcore_stream.aclose()  # type: ignore
+            await self._httpcore_stream.aclose()
 
 
 class AsyncHTTPTransport(AsyncBaseTransport):
index ea09667980ff9ddc58d54db3430dec1fef168fcb..0dff922f6c991cbc42c092a699247513607337bf 100644 (file)
@@ -29,7 +29,7 @@ flake8-pie==0.16.0; python_version>='3.7'
 importlib-metadata==4.13.0; python_version>='3.7'
 isort==5.11.4; python_version<'3.8'
 isort==5.12.0; python_version>='3.8'
-mypy==0.982
+mypy==1.0.1
 types-certifi==2021.10.8.2
 pytest==7.2.1
 trio==0.22.0