Skip to content

Commit 45f4a1e

Browse files
pkchgvanrossum
authored andcommitted
Allow nested tuples in isinstance/issubclass (#998)
Fixes #997
1 parent 43a1f76 commit 45f4a1e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

stdlib/2/__builtin__.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -718,8 +718,8 @@ def intern(string: str) -> str: ...
718718
def iter(iterable: Iterable[_T]) -> Iterator[_T]: ...
719719
@overload
720720
def iter(function: Callable[[], _T], sentinel: _T) -> Iterator[_T]: ...
721-
def isinstance(o: object, t: Union[type, Tuple[type, ...]]) -> bool: ...
722-
def issubclass(cls: type, classinfo: Union[type, Tuple[type, ...]]) -> bool: ...
721+
def isinstance(o: object, t: Union[type, Tuple[Union[type, Tuple], ...]]) -> bool: ...
722+
def issubclass(cls: type, classinfo: Union[type, Tuple[Union[type, Tuple], ...]]) -> bool: ...
723723
def len(o: Sized) -> int: ...
724724
@overload
725725
def map(func: Callable[[_T1], _S], iter1: Iterable[_T1]) -> List[_S]: ...

stdlib/3/builtins.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -773,8 +773,8 @@ def input(prompt: Any = None) -> str: ...
773773
def iter(iterable: Iterable[_T]) -> Iterator[_T]: ...
774774
@overload
775775
def iter(function: Callable[[], _T], sentinel: _T) -> Iterator[_T]: ...
776-
def isinstance(o: object, t: Union[type, Tuple[type, ...]]) -> bool: ...
777-
def issubclass(cls: type, classinfo: Union[type, Tuple[type, ...]]) -> bool: ...
776+
def isinstance(o: object, t: Union[type, Tuple[Union[type, Tuple], ...]]) -> bool: ...
777+
def issubclass(cls: type, classinfo: Union[type, Tuple[Union[type, Tuple], ...]]) -> bool: ...
778778
def len(o: Sized) -> int: ...
779779
def license() -> None: ...
780780
def locals() -> Dict[str, Any]: ...

0 commit comments

Comments
 (0)