mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
Change the return type of __reduce__ and __reduce_ex__ to Union[str, Tuple[Any, ...]] (#3453)
This allows subclasses to return strings (which are allowed) from these methods without having mypy throwing an error. Closes #3452
This commit is contained in:
committed by
Sebastian Rittau
parent
d60b7ae26d
commit
97ecd2b91f
@@ -61,8 +61,8 @@ class object:
|
||||
def __getattribute__(self, name: str) -> Any: ...
|
||||
def __delattr__(self, name: str) -> None: ...
|
||||
def __sizeof__(self) -> int: ...
|
||||
def __reduce__(self) -> Tuple[Any, ...]: ...
|
||||
def __reduce_ex__(self, protocol: int) -> Tuple[Any, ...]: ...
|
||||
def __reduce__(self) -> Union[str, Tuple[Any, ...]]: ...
|
||||
def __reduce_ex__(self, protocol: int) -> Union[str, Tuple[Any, ...]]: ...
|
||||
if sys.version_info >= (3,):
|
||||
def __dir__(self) -> Iterable[str]: ...
|
||||
if sys.version_info >= (3, 6):
|
||||
|
||||
Reference in New Issue
Block a user