Mark final and unhashable classes in types as such (#5837)

This commit is contained in:
Bas van Beek
2021-08-02 22:46:14 +02:00
committed by GitHub
parent acc576659a
commit 475417fa97
3 changed files with 31 additions and 7 deletions

View File

@@ -160,8 +160,8 @@ class type(object):
@classmethod
def __prepare__(metacls, __name: str, __bases: Tuple[type, ...], **kwds: Any) -> Mapping[str, Any]: ...
if sys.version_info >= (3, 10):
def __or__(self, t: Any) -> types.Union: ...
def __ror__(self, t: Any) -> types.Union: ...
def __or__(self, t: Any) -> types.UnionType: ...
def __ror__(self, t: Any) -> types.UnionType: ...
class super(object):
@overload
@@ -1060,10 +1060,10 @@ def iter(__function: Callable[[], _T], __sentinel: Any) -> Iterator[_T]: ...
if sys.version_info >= (3, 10):
def isinstance(
__obj: object, __class_or_tuple: Union[type, types.Union, Tuple[Union[type, types.Union, Tuple[Any, ...]], ...]]
__obj: object, __class_or_tuple: Union[type, types.UnionType, Tuple[Union[type, types.UnionType, Tuple[Any, ...]], ...]]
) -> bool: ...
def issubclass(
__cls: type, __class_or_tuple: Union[type, types.Union, Tuple[Union[type, types.Union, Tuple[Any, ...]], ...]]
__cls: type, __class_or_tuple: Union[type, types.UnionType, Tuple[Union[type, types.UnionType, Tuple[Any, ...]], ...]]
) -> bool: ...
else: