From 45f4a1e913fb06f22a2a8584c4c5cb07e43b3286 Mon Sep 17 00:00:00 2001 From: =^_^= Date: Tue, 14 Mar 2017 08:04:12 -0700 Subject: [PATCH] Allow nested tuples in isinstance/issubclass (#998) Fixes #997 --- stdlib/2/__builtin__.pyi | 4 ++-- stdlib/3/builtins.pyi | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/stdlib/2/__builtin__.pyi b/stdlib/2/__builtin__.pyi index 1189eb242..a1a57dee1 100644 --- a/stdlib/2/__builtin__.pyi +++ b/stdlib/2/__builtin__.pyi @@ -718,8 +718,8 @@ def intern(string: str) -> str: ... 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: Union[type, Tuple[type, ...]]) -> bool: ... +def isinstance(o: object, t: Union[type, Tuple[Union[type, Tuple], ...]]) -> bool: ... +def issubclass(cls: type, classinfo: Union[type, Tuple[Union[type, Tuple], ...]]) -> bool: ... def len(o: Sized) -> int: ... @overload def map(func: Callable[[_T1], _S], iter1: Iterable[_T1]) -> List[_S]: ... diff --git a/stdlib/3/builtins.pyi b/stdlib/3/builtins.pyi index d75ae7095..4ce901e46 100644 --- a/stdlib/3/builtins.pyi +++ b/stdlib/3/builtins.pyi @@ -773,8 +773,8 @@ def input(prompt: Any = None) -> str: ... 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: Union[type, Tuple[type, ...]]) -> bool: ... +def isinstance(o: object, t: Union[type, Tuple[Union[type, Tuple], ...]]) -> bool: ... +def issubclass(cls: type, classinfo: Union[type, Tuple[Union[type, Tuple], ...]]) -> bool: ... def len(o: Sized) -> int: ... def license() -> None: ... def locals() -> Dict[str, Any]: ...