diff --git a/stdlib/2/inspect.pyi b/stdlib/2/inspect.pyi index 7dc8714b4521..2887a1a4d3ca 100644 --- a/stdlib/2/inspect.pyi +++ b/stdlib/2/inspect.pyi @@ -29,7 +29,7 @@ ModuleInfo = NamedTuple('ModuleInfo', [('name', str), ]) def getmembers( object: object, - predicate: Callable[[Any], bool] = ... + predicate: Optional[Callable[[Any], bool]] = ... ) -> List[Tuple[str, Any]]: ... def getmoduleinfo(path: str) -> Optional[ModuleInfo]: ... def getmodulename(path: str) -> Optional[str]: ... diff --git a/stdlib/3/inspect.pyi b/stdlib/3/inspect.pyi index be72b6457e58..3deef08f62a2 100644 --- a/stdlib/3/inspect.pyi +++ b/stdlib/3/inspect.pyi @@ -39,7 +39,7 @@ if sys.version_info < (3, 6): def getmoduleinfo(path: str) -> Optional[ModuleInfo]: ... def getmembers(object: object, - predicate: Callable[[Any], bool] = ..., + predicate: Optional[Callable[[Any], bool]] = ..., ) -> List[Tuple[str, Any]]: ... def getmodulename(path: str) -> Optional[str]: ...