Big diff: use lower-case list and dict (#5888)

This commit is contained in:
Akuli
2021-08-08 19:26:35 +03:00
committed by GitHub
parent 11f54c3407
commit ce11072dbe
325 changed files with 2196 additions and 2334 deletions

View File

@@ -43,8 +43,8 @@ class ProtocolError(Error):
url: str
errcode: int
errmsg: str
headers: Dict[str, str]
def __init__(self, url: str, errcode: int, errmsg: str, headers: Dict[str, str]) -> None: ...
headers: dict[str, str]
def __init__(self, url: str, errcode: int, errmsg: str, headers: dict[str, str]) -> None: ...
class ResponseError(Error): ...
@@ -95,11 +95,11 @@ class ExpatParser: # undocumented
class Marshaller:
dispatch: Dict[
dispatch: dict[
Type[Any], Callable[[Marshaller, Any, Callable[[str], Any]], None]
] = ... # TODO: Replace 'Any' with some kind of binding
memo: Dict[Any, None]
memo: dict[Any, None]
data: None
encoding: str | None
allow_none: bool
@@ -122,12 +122,12 @@ class Marshaller:
class Unmarshaller:
dispatch: Dict[str, Callable[[Unmarshaller, str], None]] = ...
dispatch: dict[str, Callable[[Unmarshaller, str], None]] = ...
_type: str | None
_stack: List[_Marshallable]
_marks: List[int]
_data: List[str]
_stack: list[_Marshallable]
_marks: list[int]
_data: list[str]
_value: bool
_methodname: str | None
_encoding: str
@@ -138,7 +138,7 @@ class Unmarshaller:
def close(self) -> Tuple[_Marshallable, ...]: ...
def getmethodname(self) -> str | None: ...
def xml(self, encoding: str, standalone: Any) -> None: ... # Standalone is ignored
def start(self, tag: str, attrs: Dict[str, str]) -> None: ...
def start(self, tag: str, attrs: dict[str, str]) -> None: ...
def data(self, text: str) -> None: ...
def end(self, tag: str) -> None: ...
def end_dispatch(self, tag: str, data: str) -> None: ...
@@ -159,22 +159,22 @@ class Unmarshaller:
class _MultiCallMethod: # undocumented
__call_list: List[Tuple[str, Tuple[_Marshallable, ...]]]
__call_list: list[Tuple[str, Tuple[_Marshallable, ...]]]
__name: str
def __init__(self, call_list: List[Tuple[str, _Marshallable]], name: str) -> None: ...
def __init__(self, call_list: list[Tuple[str, _Marshallable]], name: str) -> None: ...
def __getattr__(self, name: str) -> _MultiCallMethod: ...
def __call__(self, *args: _Marshallable) -> None: ...
class MultiCallIterator: # undocumented
results: List[List[_Marshallable]]
def __init__(self, results: List[List[_Marshallable]]) -> None: ...
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, ...]]]
__call_list: list[Tuple[str, Tuple[_Marshallable, ...]]]
def __init__(self, server: ServerProxy) -> None: ...
def __getattr__(self, item: str) -> _MultiCallMethod: ...
def __call__(self) -> MultiCallIterator: ...
@@ -219,8 +219,8 @@ class Transport:
_use_datetime: bool
_use_builtin_types: bool
_connection: Tuple[_HostType | None, http.client.HTTPConnection | None]
_headers: List[Tuple[str, str]]
_extra_headers: List[Tuple[str, str]]
_headers: list[Tuple[str, str]]
_extra_headers: list[Tuple[str, str]]
if sys.version_info >= (3, 8):
def __init__(
@@ -233,11 +233,11 @@ class Transport:
self, host: _HostType, handler: str, request_body: bytes, verbose: bool = ...
) -> Tuple[_Marshallable, ...]: ...
def getparser(self) -> Tuple[ExpatParser, Unmarshaller]: ...
def get_host_info(self, host: _HostType) -> Tuple[str, List[Tuple[str, str]], Dict[str, str]]: ...
def get_host_info(self, host: _HostType) -> Tuple[str, list[Tuple[str, str]], dict[str, str]]: ...
def make_connection(self, host: _HostType) -> http.client.HTTPConnection: ...
def close(self) -> None: ...
def send_request(self, host: _HostType, handler: str, request_body: bytes, debug: bool) -> http.client.HTTPConnection: ...
def send_headers(self, connection: http.client.HTTPConnection, headers: List[Tuple[str, str]]) -> None: ...
def send_headers(self, connection: http.client.HTTPConnection, headers: list[Tuple[str, str]]) -> None: ...
def send_content(self, connection: http.client.HTTPConnection, request_body: bytes) -> None: ...
def parse_response(self, response: http.client.HTTPResponse) -> Tuple[_Marshallable, ...]: ...