From 41630486e3b676cf93b18761bbf3b044ca6798c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oleg=20H=C3=B6fling?= Date: Mon, 2 Aug 2021 09:19:11 +0200 Subject: [PATCH] Add `Typeguard` back to `inspect.isclass()` return type (#5829) --- stdlib/inspect.pyi | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/stdlib/inspect.pyi b/stdlib/inspect.pyi index 18038ad99..946115e51 100644 --- a/stdlib/inspect.pyi +++ b/stdlib/inspect.pyi @@ -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]: ...