Add Typeguard back to inspect.isclass() return type (#5829)

This commit is contained in:
Oleg Höfling
2021-08-02 09:19:11 +02:00
committed by GitHub
parent 1f3c703993
commit 41630486e3

View File

@@ -48,9 +48,7 @@ TPFLAGS_IS_ABSTRACT: int
def getmembers(object: object, predicate: Optional[Callable[[Any], bool]] = ...) -> list[Tuple[str, Any]]: ...
def getmodulename(path: str) -> Optional[str]: ...
def ismodule(object: object) -> TypeGuard[ModuleType]: ...
# TODO: use TypeGuard[Type[Any]] after python/mypy#10486 is resolved
def isclass(object: object) -> bool: ...
def isclass(object: object) -> TypeGuard[Type[Any]]: ...
def ismethod(object: object) -> TypeGuard[MethodType]: ...
def isfunction(object: object) -> TypeGuard[FunctionType]: ...