Use lowercase type everywhere (#6853)

This commit is contained in:
Alex Waygood
2022-01-08 15:09:29 +00:00
committed by GitHub
parent f8501d33c7
commit a40d79a4e6
172 changed files with 728 additions and 761 deletions

View File

@@ -6,7 +6,7 @@ from _typeshed import Self, SupportsRead, SupportsWrite
from datetime import datetime
from io import BytesIO
from types import TracebackType
from typing import Any, Callable, Iterable, Mapping, Protocol, Type, Union, overload
from typing import Any, Callable, Iterable, Mapping, Protocol, Union, overload
from typing_extensions import Literal
class _SupportsTimeTuple(Protocol):
@@ -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: ...
@@ -96,7 +96,7 @@ class ExpatParser: # undocumented
class Marshaller:
dispatch: dict[
Type[Any], Callable[[Marshaller, Any, Callable[[str], Any]], None]
type[Any], Callable[[Marshaller, Any, Callable[[str], Any]], None]
] # TODO: Replace 'Any' with some kind of binding
memo: dict[Any, None]
@@ -301,7 +301,7 @@ class ServerProxy:
def __call__(self, attr: str) -> Callable[[], None] | Transport: ...
def __enter__(self: Self) -> Self: ...
def __exit__(
self, exc_type: Type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
) -> None: ...
def __close(self) -> None: ... # undocumented
def __request(self, methodname: str, params: tuple[_Marshallable, ...]) -> tuple[_Marshallable, ...]: ... # undocumented

View File

@@ -3,7 +3,7 @@ import pydoc
import socketserver
import sys
from datetime import datetime
from typing import Any, Callable, Iterable, Mapping, Pattern, Protocol, Type, Union
from typing import Any, Callable, Iterable, Mapping, Pattern, Protocol, Union
from xmlrpc.client import Fault
# TODO: Recursive type on tuple, list, dict
@@ -81,7 +81,7 @@ class SimpleXMLRPCServer(socketserver.TCPServer, SimpleXMLRPCDispatcher):
def __init__(
self,
addr: tuple[str, int],
requestHandler: Type[SimpleXMLRPCRequestHandler] = ...,
requestHandler: type[SimpleXMLRPCRequestHandler] = ...,
logRequests: bool = ...,
allow_none: bool = ...,
encoding: str | None = ...,
@@ -97,7 +97,7 @@ class MultiPathXMLRPCServer(SimpleXMLRPCServer): # undocumented
def __init__(
self,
addr: tuple[str, int],
requestHandler: Type[SimpleXMLRPCRequestHandler] = ...,
requestHandler: type[SimpleXMLRPCRequestHandler] = ...,
logRequests: bool = ...,
allow_none: bool = ...,
encoding: str | None = ...,
@@ -150,7 +150,7 @@ class DocXMLRPCServer(SimpleXMLRPCServer, XMLRPCDocGenerator):
def __init__(
self,
addr: tuple[str, int],
requestHandler: Type[SimpleXMLRPCRequestHandler] = ...,
requestHandler: type[SimpleXMLRPCRequestHandler] = ...,
logRequests: bool = ...,
allow_none: bool = ...,
encoding: str | None = ...,