Use lowercase tuple where possible (#6170)

This commit is contained in:
Akuli
2021-10-15 00:18:19 +00:00
committed by GitHub
parent 5f386b0575
commit 994b69ef8f
242 changed files with 1212 additions and 1224 deletions

View File

@@ -69,7 +69,7 @@ class DateTime:
def __gt__(self, other: _DateTimeComparable) -> bool: ...
def __ge__(self, other: _DateTimeComparable) -> bool: ...
def __eq__(self, other: _DateTimeComparable) -> bool: ... # type: ignore
def make_comparable(self, other: _DateTimeComparable) -> Tuple[str, str]: ... # undocumented
def make_comparable(self, other: _DateTimeComparable) -> tuple[str, str]: ... # undocumented
def timetuple(self) -> time.struct_time: ... # undocumented
def decode(self, data: Any) -> None: ...
def encode(self, out: SupportsWrite[str]) -> None: ...
@@ -86,7 +86,7 @@ class Binary:
def _binary(data: bytes) -> Binary: ... # undocumented
WRAPPERS: Tuple[Type[DateTime], Type[Binary]] # undocumented
WRAPPERS: tuple[Type[DateTime], Type[Binary]] # undocumented
class ExpatParser: # undocumented
def __init__(self, target: Unmarshaller) -> None: ...
@@ -159,9 +159,9 @@ 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: ...
@@ -174,7 +174,7 @@ class MultiCallIterator: # undocumented
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: ...
@@ -184,7 +184,7 @@ FastMarshaller: Marshaller | None
FastParser: ExpatParser | None
FastUnmarshaller: Unmarshaller | None
def getparser(use_datetime: bool = ..., use_builtin_types: bool = ...) -> Tuple[ExpatParser, Unmarshaller]: ...
def getparser(use_datetime: bool = ..., use_builtin_types: bool = ...) -> tuple[ExpatParser, Unmarshaller]: ...
def dumps(
params: Fault | Tuple[_Marshallable, ...],
methodname: str | None = ...,
@@ -192,7 +192,7 @@ def dumps(
encoding: str | None = ...,
allow_none: bool = ...,
) -> str: ...
def loads(data: str, use_datetime: bool = ..., use_builtin_types: bool = ...) -> Tuple[Tuple[_Marshallable, ...], str | None]: ...
def loads(data: str, use_datetime: bool = ..., use_builtin_types: bool = ...) -> tuple[Tuple[_Marshallable, ...], str | None]: ...
def gzip_encode(data: bytes) -> bytes: ... # undocumented
def gzip_decode(data: bytes, max_decode: int = ...) -> bytes: ... # undocumented
@@ -218,13 +218,13 @@ 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]]
_connection: tuple[_HostType | None, http.client.HTTPConnection | None]
_headers: list[tuple[str, str]]
_extra_headers: list[tuple[str, str]]
if sys.version_info >= (3, 8):
def __init__(
self, use_datetime: bool = ..., use_builtin_types: bool = ..., *, headers: Iterable[Tuple[str, str]] = ...
self, use_datetime: bool = ..., use_builtin_types: bool = ..., *, headers: Iterable[tuple[str, str]] = ...
) -> None: ...
else:
def __init__(self, use_datetime: bool = ..., use_builtin_types: bool = ...) -> None: ...
@@ -232,12 +232,12 @@ class Transport:
def single_request(
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 getparser(self) -> tuple[ExpatParser, Unmarshaller]: ...
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, ...]: ...
@@ -249,7 +249,7 @@ class SafeTransport(Transport):
use_datetime: bool = ...,
use_builtin_types: bool = ...,
*,
headers: Iterable[Tuple[str, str]] = ...,
headers: Iterable[tuple[str, str]] = ...,
context: Any | None = ...,
) -> None: ...
else:
@@ -276,7 +276,7 @@ class ServerProxy:
use_datetime: bool = ...,
use_builtin_types: bool = ...,
*,
headers: Iterable[Tuple[str, str]] = ...,
headers: Iterable[tuple[str, str]] = ...,
context: Any | None = ...,
) -> None: ...
else:

View File

@@ -64,7 +64,7 @@ class SimpleXMLRPCDispatcher: # undocumented
class SimpleXMLRPCRequestHandler(http.server.BaseHTTPRequestHandler):
rpc_paths: Tuple[str, str]
rpc_paths: tuple[str, str]
encode_threshold: int # undocumented
aepattern: Pattern[str] # undocumented
def accept_encodings(self) -> dict[str, float]: ...
@@ -80,7 +80,7 @@ class SimpleXMLRPCServer(socketserver.TCPServer, SimpleXMLRPCDispatcher):
_send_traceback_handler: bool
def __init__(
self,
addr: Tuple[str, int],
addr: tuple[str, int],
requestHandler: Type[SimpleXMLRPCRequestHandler] = ...,
logRequests: bool = ...,
allow_none: bool = ...,
@@ -96,7 +96,7 @@ class MultiPathXMLRPCServer(SimpleXMLRPCServer): # undocumented
encoding: str
def __init__(
self,
addr: Tuple[str, int],
addr: tuple[str, int],
requestHandler: Type[SimpleXMLRPCRequestHandler] = ...,
logRequests: bool = ...,
allow_none: bool = ...,
@@ -140,7 +140,7 @@ class DocXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
class DocXMLRPCServer(SimpleXMLRPCServer, XMLRPCDocGenerator):
def __init__(
self,
addr: Tuple[str, int],
addr: tuple[str, int],
requestHandler: Type[SimpleXMLRPCRequestHandler] = ...,
logRequests: bool = ...,
allow_none: bool = ...,