Bump black to 23.1.0 (#9647)

This commit is contained in:
Alex Waygood
2023-02-01 14:06:04 +00:00
committed by GitHub
parent 7cd7ae46c0
commit 8e7b78a8e8
24 changed files with 11 additions and 55 deletions

View File

@@ -1,7 +1,6 @@
import sys
if sys.platform == "win32":
# Actual typename View, not exposed by the implementation
class _View:
def Execute(self, params: _Record | None = ...) -> None: ...
@@ -12,6 +11,7 @@ if sys.platform == "win32":
# Don't exist at runtime
__new__: None # type: ignore[assignment]
__init__: None # type: ignore[assignment]
# Actual typename SummaryInformation, not exposed by the implementation
class _SummaryInformation:
def GetProperty(self, field: int) -> int | bytes | None: ...
@@ -21,6 +21,7 @@ if sys.platform == "win32":
# Don't exist at runtime
__new__: None # type: ignore[assignment]
__init__: None # type: ignore[assignment]
# Actual typename Database, not exposed by the implementation
class _Database:
def OpenView(self, sql: str) -> _View: ...
@@ -30,6 +31,7 @@ if sys.platform == "win32":
# Don't exist at runtime
__new__: None # type: ignore[assignment]
__init__: None # type: ignore[assignment]
# Actual typename Record, not exposed by the implementation
class _Record:
def GetFieldCount(self) -> int: ...

View File

@@ -9,7 +9,6 @@ from . import events, futures, protocols, transports
_File: TypeAlias = int | IO[Any] | None
class BaseSubprocessTransport(transports.SubprocessTransport):
_closed: bool # undocumented
_protocol: protocols.SubprocessProtocol # undocumented
_loop: events.AbstractEventLoop # undocumented

View File

@@ -57,7 +57,6 @@ class _ProactorWritePipeTransport(_ProactorBaseWritePipeTransport): ...
class _ProactorDuplexPipeTransport(_ProactorReadPipeTransport, _ProactorBaseWritePipeTransport, transports.Transport): ...
class _ProactorSocketTransport(_ProactorReadPipeTransport, _ProactorBaseWritePipeTransport, transports.Transport):
_sendfile_compatible: ClassVar[constants._SendfileMode]
def __init__(
self,

View File

@@ -35,7 +35,6 @@ else:
if sys.version_info < (3, 11):
class _SSLPipe:
max_size: ClassVar[int]
_context: ssl.SSLContext
@@ -64,7 +63,6 @@ if sys.version_info < (3, 11):
def feed_appdata(self, data: bytes, offset: int = 0) -> tuple[list[bytes], int]: ...
class _SSLProtocolTransport(transports._FlowControlMixin, transports.Transport):
_sendfile_compatible: ClassVar[constants._SendfileMode]
_loop: events.AbstractEventLoop

View File

@@ -85,7 +85,6 @@ if sys.platform != "win32":
DefaultEventLoopPolicy = _UnixDefaultEventLoopPolicy
if sys.version_info >= (3, 8):
from typing import Protocol
class _Warn(Protocol):

View File

@@ -25,7 +25,6 @@ def loop(timeout: float = 30.0, use_poll: bool = False, map: _MapType | None = N
# Not really subclass of socket.socket; it's only delegation.
# It is not covariant to it.
class dispatcher:
debug: bool
connected: bool
accepting: bool

View File

@@ -70,7 +70,6 @@ class Bdb:
def runcall(self, __func: Callable[_P, _T], *args: _P.args, **kwds: _P.kwargs) -> _T | None: ...
class Breakpoint:
next: int
bplist: dict[tuple[str, int], list[Breakpoint]]
bpbynumber: list[Breakpoint | None]

View File

@@ -63,7 +63,7 @@ else:
def lru_cache(maxsize: int | None = 128, typed: bool = False) -> Callable[[Callable[..., _T]], _lru_cache_wrapper[_T]]: ...
WRAPPER_ASSIGNMENTS: tuple[
Literal["__module__"], Literal["__name__"], Literal["__qualname__"], Literal["__doc__"], Literal["__annotations__"],
Literal["__module__"], Literal["__name__"], Literal["__qualname__"], Literal["__doc__"], Literal["__annotations__"]
]
WRAPPER_UPDATES: tuple[Literal["__dict__"]]

View File

@@ -105,7 +105,6 @@ class Mailbox(Generic[_MessageT]):
def __class_getitem__(cls, item: Any) -> GenericAlias: ...
class Maildir(Mailbox[MaildirMessage]):
colon: str
def __init__(
self, dirname: StrPath, factory: Callable[[IO[Any]], MaildirMessage] | None = None, create: bool = True

View File

@@ -23,7 +23,6 @@ class Module: # undocumented
def __init__(self, name: str, file: str | None = None, path: str | None = None) -> None: ...
class ModuleFinder:
modules: dict[str, Module]
path: list[str] # undocumented
badmodules: dict[str, dict[str, int]] # undocumented

View File

@@ -24,7 +24,6 @@ if sys.platform == "win32":
knownbits: Literal[0x3FFF]
class Table:
name: str
fields: list[tuple[int, str, int]]
def __init__(self, name: str) -> None: ...
@@ -50,7 +49,6 @@ if sys.platform == "win32":
def gen_uuid() -> str: ...
class CAB:
name: str
files: list[tuple[str, str]]
filenames: set[str]
@@ -62,7 +60,6 @@ if sys.platform == "win32":
_directories: set[str]
class Directory:
db: _Database
cab: CAB
basedir: str
@@ -98,12 +95,10 @@ if sys.platform == "win32":
def remove_pyc(self) -> None: ...
class Binary:
name: str
def __init__(self, fname: str) -> None: ...
class Feature:
id: str
def __init__(
self,
@@ -120,7 +115,6 @@ if sys.platform == "win32":
def set_current(self) -> None: ...
class Control:
dlg: Dialog
name: str
def __init__(self, dlg: Dialog, name: str) -> None: ...
@@ -129,14 +123,12 @@ if sys.platform == "win32":
def condition(self, action: str, condition: str) -> None: ...
class RadioButtonGroup(Control):
property: str
index: int
def __init__(self, dlg: Dialog, name: str, property: str) -> None: ...
def add(self, name: str, x: int, y: int, w: int, h: int, text: str, value: str | None = None) -> None: ...
class Dialog:
db: _Database
name: str
x: int

View File

@@ -2,7 +2,6 @@ import sys
from typing_extensions import TypeAlias
if sys.platform == "win32":
_SequenceType: TypeAlias = list[tuple[str, str | None, int]]
AdminExecuteSequence: _SequenceType

View File

@@ -1,7 +1,6 @@
import sys
if sys.platform == "win32":
ActionText: list[tuple[str, str, str | None]]
UIText: list[tuple[str, str | None]]

View File

@@ -55,7 +55,6 @@ INTERNAL_ERROR: int # undocumented
class Error(Exception): ...
class ProtocolError(Error):
url: str
errcode: int
errmsg: str
@@ -65,7 +64,6 @@ class ProtocolError(Error):
class ResponseError(Error): ...
class Fault(Error):
faultCode: int
faultString: str
def __init__(self, faultCode: int, faultString: str, **extra: Any) -> None: ...
@@ -77,7 +75,6 @@ def _iso8601_format(value: datetime) -> str: ... # undocumented
def _strftime(value: _XMLDate) -> str: ... # undocumented
class DateTime:
value: str # undocumented
def __init__(self, value: int | str | datetime | time.struct_time | tuple[int, ...] = 0) -> None: ...
def __lt__(self, other: _DateTimeComparable) -> bool: ...
@@ -94,7 +91,6 @@ def _datetime(data: Any) -> DateTime: ... # undocumented
def _datetime_type(data: str) -> datetime: ... # undocumented
class Binary:
data: bytes
def __init__(self, data: bytes | bytearray | None = None) -> None: ...
def decode(self, data: ReadableBuffer) -> None: ...
@@ -137,7 +133,6 @@ class Marshaller:
def dump_instance(self, value: object, write: _WriteCallback) -> None: ...
class Unmarshaller:
dispatch: dict[str, Callable[[Unmarshaller, str], None]]
_type: str | None
@@ -174,7 +169,6 @@ class Unmarshaller:
def end_methodName(self, data: str) -> None: ...
class _MultiCallMethod: # undocumented
__call_list: list[tuple[str, tuple[_Marshallable, ...]]]
__name: str
def __init__(self, call_list: list[tuple[str, _Marshallable]], name: str) -> None: ...
@@ -182,13 +176,11 @@ class _MultiCallMethod: # undocumented
def __call__(self, *args: _Marshallable) -> None: ...
class MultiCallIterator: # undocumented
results: list[list[_Marshallable]]
def __init__(self, results: list[list[_Marshallable]]) -> None: ...
def __getitem__(self, i: int) -> _Marshallable: ...
class MultiCall:
__server: ServerProxy
__call_list: list[tuple[str, tuple[_Marshallable, ...]]]
def __init__(self, server: ServerProxy) -> None: ...
@@ -215,12 +207,10 @@ def gzip_encode(data: ReadableBuffer) -> bytes: ... # undocumented
def gzip_decode(data: ReadableBuffer, max_decode: int = ...) -> bytes: ... # undocumented
class GzipDecodedResponse(gzip.GzipFile): # undocumented
io: BytesIO
def __init__(self, response: SupportsRead[ReadableBuffer]) -> None: ...
class _Method: # undocumented
__send: Callable[[str, tuple[_Marshallable, ...]], _Marshallable]
__name: str
def __init__(self, send: Callable[[str, tuple[_Marshallable, ...]], _Marshallable], name: str) -> None: ...
@@ -228,7 +218,6 @@ class _Method: # undocumented
def __call__(self, *args: _Marshallable) -> _Marshallable: ...
class Transport:
user_agent: str
accept_gzip_encoding: bool
encode_threshold: int | None
@@ -264,7 +253,6 @@ class Transport:
def parse_response(self, response: http.client.HTTPResponse) -> tuple[_Marshallable, ...]: ...
class SafeTransport(Transport):
if sys.version_info >= (3, 8):
def __init__(
self,
@@ -282,7 +270,6 @@ class SafeTransport(Transport):
def make_connection(self, host: _HostType) -> http.client.HTTPSConnection: ...
class ServerProxy:
__host: str
__handler: str
__transport: Transport

View File

@@ -36,7 +36,6 @@ def resolve_dotted_attribute(obj: Any, attr: str, allow_dotted_names: bool = Tru
def list_public_methods(obj: Any) -> list[str]: ... # undocumented
class SimpleXMLRPCDispatcher: # undocumented
funcs: dict[str, _DispatchProtocol]
instance: Any | None
allow_none: bool
@@ -70,7 +69,6 @@ class SimpleXMLRPCRequestHandler(http.server.BaseHTTPRequestHandler):
def report_404(self) -> None: ...
class SimpleXMLRPCServer(socketserver.TCPServer, SimpleXMLRPCDispatcher):
_send_traceback_handler: bool
def __init__(
self,
@@ -84,7 +82,6 @@ class SimpleXMLRPCServer(socketserver.TCPServer, SimpleXMLRPCDispatcher):
) -> None: ...
class MultiPathXMLRPCServer(SimpleXMLRPCServer): # undocumented
dispatchers: dict[str, SimpleXMLRPCDispatcher]
def __init__(
self,
@@ -119,7 +116,6 @@ class ServerHTMLDoc(pydoc.HTMLDoc): # undocumented
def docserver(self, server_name: str, package_documentation: str, methods: dict[str, str]) -> str: ...
class XMLRPCDocGenerator: # undocumented
server_name: str
server_documentation: str
server_title: str