Bump mypy from 0.982 to 1.0.1 (#2611)

* 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>
This commit is contained in:
dependabot[bot] 2023-03-01 11:53:54 -06:00 committed by GitHub
parent 99a080ea78
commit 6779fae5ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 8 deletions

View 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)

View 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):

View 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