Upgrade black version (#7089)

This commit is contained in:
Shantanu
2022-01-30 16:27:06 -08:00
committed by GitHub
parent 9854926289
commit b88a6f19cd
173 changed files with 496 additions and 2 deletions

View File

@@ -96,6 +96,7 @@ class ZipExtFile(io.BufferedIOBase):
decrypter: Callable[[Sequence[int]], bytes] | None = ...,
close_fileobj: Literal[False] = ...,
) -> None: ...
def read(self, n: int | None = ...) -> bytes: ...
def readline(self, limit: int = ...) -> bytes: ... # type: ignore[override]
def peek(self, n: int = ...) -> bytes: ...
@@ -142,6 +143,7 @@ class ZipFile:
def __init__(
self, file: StrPath | IO[bytes], mode: _ZipFileMode = ..., compression: int = ..., allowZip64: bool = ...
) -> None: ...
def __enter__(self: Self) -> Self: ...
def __exit__(
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
@@ -214,6 +216,7 @@ class ZipInfo:
else:
@classmethod
def from_file(cls, filename: StrPath, arcname: StrPath | None = ...) -> ZipInfo: ...
def is_dir(self) -> bool: ...
def FileHeader(self, zip64: bool | None = ...) -> bytes: ...
@@ -229,12 +232,14 @@ if sys.version_info >= (3, 8):
if sys.version_info >= (3, 10):
@property
def filename(self) -> PathLike[str]: ... # undocumented
def __init__(self, root: ZipFile | StrPath | IO[bytes], at: str = ...) -> None: ...
if sys.version_info >= (3, 9):
def open(self, mode: _ReadWriteBinaryMode = ..., *args: Any, pwd: bytes | None = ..., **kwargs: Any) -> IO[bytes]: ...
else:
@property
def open(self) -> _PathOpenProtocol: ...
def iterdir(self) -> Iterator[Path]: ...
def is_dir(self) -> bool: ...
def is_file(self) -> bool: ...
@@ -252,6 +257,7 @@ if sys.version_info >= (3, 8):
def joinpath(self, *other: StrPath) -> Path: ...
else:
def joinpath(self, add: StrPath) -> Path: ... # undocumented
def __truediv__(self, add: StrPath) -> Path: ...
def is_zipfile(filename: StrPath | IO[bytes]) -> bool: ...