upgrade black version (#4486)

Manually removed a number of trailing commas to prevent black from unnecessarily
exploding some collections.
This commit is contained in:
Jelle Zijlstra
2020-08-26 09:36:01 -07:00
committed by GitHub
parent e3e395b28c
commit 5f9fd3d127
61 changed files with 165 additions and 181 deletions

View File

@@ -136,12 +136,8 @@ OpenBinaryModeUpdating = Literal[
"b+x",
"+bx",
]
OpenBinaryModeWriting = Literal[
"wb", "bw", "ab", "ba", "xb", "bx",
]
OpenBinaryModeReading = Literal[
"rb", "br", "rbU", "rUb", "Urb", "brU", "bUr", "Ubr",
]
OpenBinaryModeWriting = Literal["wb", "bw", "ab", "ba", "xb", "bx"]
OpenBinaryModeReading = Literal["rb", "br", "rbU", "rUb", "Urb", "brU", "bUr", "Ubr"]
OpenBinaryMode = Union[OpenBinaryModeUpdating, OpenBinaryModeReading, OpenBinaryModeWriting]
class HasFileno(Protocol):

View File

@@ -641,7 +641,7 @@ if sys.version_info >= (3,):
def split(self, sep: Optional[bytes] = ..., maxsplit: int = ...) -> List[bytes]: ...
def splitlines(self, keepends: bool = ...) -> List[bytes]: ...
def startswith(
self, prefix: Union[bytes, Tuple[bytes, ...]], start: Optional[int] = ..., end: Optional[int] = ...,
self, prefix: Union[bytes, Tuple[bytes, ...]], start: Optional[int] = ..., end: Optional[int] = ...
) -> bool: ...
def strip(self, __bytes: Optional[bytes] = ...) -> bytes: ...
def swapcase(self) -> bytes: ...
@@ -759,7 +759,7 @@ class bytearray(MutableSequence[int], ByteString):
def split(self, sep: Optional[bytes] = ..., maxsplit: int = ...) -> List[bytearray]: ...
def splitlines(self, keepends: bool = ...) -> List[bytearray]: ...
def startswith(
self, __prefix: Union[bytes, Tuple[bytes, ...]], __start: Optional[int] = ..., __end: Optional[int] = ...,
self, __prefix: Union[bytes, Tuple[bytes, ...]], __start: Optional[int] = ..., __end: Optional[int] = ...
) -> bool: ...
def strip(self, __bytes: Optional[bytes] = ...) -> bytearray: ...
def swapcase(self) -> bytearray: ...

View File

@@ -57,7 +57,7 @@ class SequenceMatcher(Generic[_T]):
# mypy thinks the signatures of the overloads overlap, but the types still work fine
@overload
def get_close_matches( # type: ignore
word: AnyStr, possibilities: Iterable[AnyStr], n: int = ..., cutoff: float = ...,
word: AnyStr, possibilities: Iterable[AnyStr], n: int = ..., cutoff: float = ...
) -> List[AnyStr]: ...
@overload
def get_close_matches(

View File

@@ -49,7 +49,7 @@ def wrap_socket(
ciphers: Optional[str] = ...,
) -> SSLSocket: ...
def create_default_context(
purpose: Any = ..., *, cafile: Optional[str] = ..., capath: Optional[str] = ..., cadata: Union[Text, bytes, None] = ...,
purpose: Any = ..., *, cafile: Optional[str] = ..., capath: Optional[str] = ..., cadata: Union[Text, bytes, None] = ...
) -> SSLContext: ...
if sys.version_info >= (3, 7):
@@ -300,7 +300,7 @@ class SSLContext:
) -> None: ...
def load_default_certs(self, purpose: Purpose = ...) -> None: ...
def load_verify_locations(
self, cafile: Optional[StrPath] = ..., capath: Optional[StrPath] = ..., cadata: Union[Text, bytes, None] = ...,
self, cafile: Optional[StrPath] = ..., capath: Optional[StrPath] = ..., cadata: Union[Text, bytes, None] = ...
) -> None: ...
def get_ca_certs(self, binary_form: bool = ...) -> Union[List[_PeerCertRetDictType], List[bytes]]: ...
def set_default_verify_paths(self) -> None: ...

View File

@@ -28,6 +28,6 @@ if sys.version_info >= (3, 8):
else:
def make_parser(parser_list: List[str] = ...) -> XMLReader: ...
def parse(source: Union[str, IO[str], IO[bytes]], handler: ContentHandler, errorHandler: ErrorHandler = ...,) -> None: ...
def parseString(string: Union[bytes, Text], handler: ContentHandler, errorHandler: Optional[ErrorHandler] = ...,) -> None: ...
def parse(source: Union[str, IO[str], IO[bytes]], handler: ContentHandler, errorHandler: ErrorHandler = ...) -> None: ...
def parseString(string: Union[bytes, Text], handler: ContentHandler, errorHandler: Optional[ErrorHandler] = ...) -> None: ...
def _create_parser(parser_name: str) -> XMLReader: ...

View File

@@ -48,7 +48,7 @@ class ZipExtFile(io.BufferedIOBase):
name: str
if sys.version_info >= (3, 7):
def __init__(
self, fileobj: IO[bytes], mode: str, zipinfo: ZipInfo, pwd: Optional[bytes] = ..., close_fileobj: bool = ...,
self, fileobj: IO[bytes], mode: str, zipinfo: ZipInfo, pwd: Optional[bytes] = ..., close_fileobj: bool = ...
) -> None: ...
else:
def __init__(