stdlib: add argument default values (#9501)

This commit is contained in:
Jelle Zijlstra
2023-01-18 00:37:34 -08:00
committed by GitHub
parent 6cb934291f
commit ddfaca3200
272 changed files with 2529 additions and 2467 deletions

View File

@@ -79,7 +79,7 @@ def _strftime(value: _XMLDate) -> str: ... # undocumented
class DateTime:
value: str # undocumented
def __init__(self, value: int | str | datetime | time.struct_time | tuple[int, ...] = ...) -> None: ...
def __init__(self, value: int | str | datetime | time.struct_time | tuple[int, ...] = 0) -> None: ...
def __lt__(self, other: _DateTimeComparable) -> bool: ...
def __le__(self, other: _DateTimeComparable) -> bool: ...
def __gt__(self, other: _DateTimeComparable) -> bool: ...
@@ -96,7 +96,7 @@ def _datetime_type(data: str) -> datetime: ... # undocumented
class Binary:
data: bytes
def __init__(self, data: bytes | bytearray | None = ...) -> None: ...
def __init__(self, data: bytes | bytearray | None = None) -> None: ...
def decode(self, data: ReadableBuffer) -> None: ...
def encode(self, out: SupportsWrite[str]) -> None: ...
def __eq__(self, other: object) -> bool: ...
@@ -119,7 +119,7 @@ class Marshaller:
data: None
encoding: str | None
allow_none: bool
def __init__(self, encoding: str | None = ..., allow_none: bool = ...) -> None: ...
def __init__(self, encoding: str | None = None, allow_none: bool = False) -> None: ...
def dumps(self, values: Fault | Iterable[_Marshallable]) -> str: ...
def __dump(self, value: _Marshallable, write: _WriteCallback) -> None: ... # undocumented
def dump_nil(self, value: None, write: _WriteCallback) -> None: ...
@@ -150,7 +150,7 @@ class Unmarshaller:
append: Callable[[Any], None]
_use_datetime: bool
_use_builtin_types: bool
def __init__(self, use_datetime: bool = ..., use_builtin_types: bool = ...) -> None: ...
def __init__(self, use_datetime: bool = False, use_builtin_types: bool = False) -> None: ...
def close(self) -> tuple[_Marshallable, ...]: ...
def getmethodname(self) -> str | None: ...
def xml(self, encoding: str, standalone: Any) -> None: ... # Standalone is ignored
@@ -200,17 +200,19 @@ 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 = False, use_builtin_types: bool = False) -> tuple[ExpatParser, Unmarshaller]: ...
def dumps(
params: Fault | tuple[_Marshallable, ...],
methodname: str | None = ...,
methodresponse: bool | None = ...,
encoding: str | None = ...,
allow_none: bool = ...,
methodname: str | None = None,
methodresponse: bool | None = None,
encoding: str | None = None,
allow_none: bool = False,
) -> str: ...
def loads(data: str, use_datetime: bool = ..., use_builtin_types: bool = ...) -> tuple[tuple[_Marshallable, ...], str | None]: ...
def loads(
data: str, use_datetime: bool = False, use_builtin_types: bool = False
) -> tuple[tuple[_Marshallable, ...], str | None]: ...
def gzip_encode(data: ReadableBuffer) -> bytes: ... # undocumented
def gzip_decode(data: ReadableBuffer, max_decode: int = ...) -> bytes: ... # undocumented
def gzip_decode(data: ReadableBuffer, max_decode: int = 20971520) -> bytes: ... # undocumented
class GzipDecodedResponse(gzip.GzipFile): # undocumented
@@ -239,16 +241,16 @@ class Transport:
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 = False, use_builtin_types: bool = False, *, headers: Iterable[tuple[str, str]] = ...
) -> None: ...
else:
def __init__(self, use_datetime: bool = ..., use_builtin_types: bool = ...) -> None: ...
def request(
self, host: _HostType, handler: str, request_body: _BufferWithLen, verbose: bool = ...
self, host: _HostType, handler: str, request_body: _BufferWithLen, verbose: bool = False
) -> tuple[_Marshallable, ...]: ...
def single_request(
self, host: _HostType, handler: str, request_body: _BufferWithLen, verbose: bool = ...
self, host: _HostType, handler: str, request_body: _BufferWithLen, verbose: bool = False
) -> tuple[_Marshallable, ...]: ...
def getparser(self) -> tuple[ExpatParser, Unmarshaller]: ...
def get_host_info(self, host: _HostType) -> tuple[str, list[tuple[str, str]], dict[str, str]]: ...
@@ -266,11 +268,11 @@ class SafeTransport(Transport):
if sys.version_info >= (3, 8):
def __init__(
self,
use_datetime: bool = ...,
use_builtin_types: bool = ...,
use_datetime: bool = False,
use_builtin_types: bool = False,
*,
headers: Iterable[tuple[str, str]] = ...,
context: Any | None = ...,
context: Any | None = None,
) -> None: ...
else:
def __init__(self, use_datetime: bool = ..., use_builtin_types: bool = ..., *, context: Any | None = ...) -> None: ...
@@ -290,15 +292,15 @@ class ServerProxy:
def __init__(
self,
uri: str,
transport: Transport | None = ...,
encoding: str | None = ...,
verbose: bool = ...,
allow_none: bool = ...,
use_datetime: bool = ...,
use_builtin_types: bool = ...,
transport: Transport | None = None,
encoding: str | None = None,
verbose: bool = False,
allow_none: bool = False,
use_datetime: bool = False,
use_builtin_types: bool = False,
*,
headers: Iterable[tuple[str, str]] = ...,
context: Any | None = ...,
context: Any | None = None,
) -> None: ...
else:
def __init__(