mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
Handle passing a tuple of types to issubclass() (#459)
It can't be just any sequence hence Tuple is used instead of previously mentioned Sequence.
This commit is contained in:
committed by
Guido van Rossum
parent
8fd2aca9a4
commit
f3818cabbc
@@ -670,9 +670,7 @@ def iter(iterable: Iterable[_T]) -> Iterator[_T]: ...
|
||||
@overload
|
||||
def iter(function: Callable[[], _T], sentinel: _T) -> Iterator[_T]: ...
|
||||
def isinstance(o: object, t: Union[type, Tuple[type, ...]]) -> bool: ...
|
||||
def issubclass(cls: type, classinfo: type) -> bool: ...
|
||||
# TODO support this
|
||||
#def issubclass(type cld, classinfo: Sequence[type]) -> bool: ...
|
||||
def issubclass(cls: type, classinfo: Union[type, Tuple[type, ...]]) -> bool: ...
|
||||
def len(o: Sized) -> int: ...
|
||||
def license() -> None: ...
|
||||
def locals() -> Dict[str, Any]: ...
|
||||
|
||||
Reference in New Issue
Block a user