diff --git a/stdlib/pydoc.pyi b/stdlib/pydoc.pyi index b97b191ce..0dd273979 100644 --- a/stdlib/pydoc.pyi +++ b/stdlib/pydoc.pyi @@ -6,6 +6,7 @@ from collections.abc import Callable, Container, Mapping, MutableMapping from reprlib import Repr from types import MethodType, ModuleType, TracebackType from typing import IO, Any, AnyStr, NoReturn, TypeVar +from typing_extensions import TypeGuard __all__ = ["help"] @@ -231,5 +232,5 @@ class ModuleScanner: ) -> None: ... def apropos(key: str) -> None: ... -def ispath(x: Any) -> bool: ... +def ispath(x: object) -> TypeGuard[str]: ... def cli() -> None: ...