Skip to content

Commit 351d019

Browse files
Mathieu Leduc-HamelJelleZijlstra
Mathieu Leduc-Hamel
authored andcommitted
Mark inspect.getmembers as Optional for both Py2 and Py3 (#2172)
1 parent da7b049 commit 351d019

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

stdlib/2/inspect.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ ModuleInfo = NamedTuple('ModuleInfo', [('name', str),
2929
])
3030
def getmembers(
3131
object: object,
32-
predicate: Callable[[Any], bool] = ...
32+
predicate: Optional[Callable[[Any], bool]] = ...
3333
) -> List[Tuple[str, Any]]: ...
3434
def getmoduleinfo(path: str) -> Optional[ModuleInfo]: ...
3535
def getmodulename(path: str) -> Optional[str]: ...

stdlib/3/inspect.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ if sys.version_info < (3, 6):
3939
def getmoduleinfo(path: str) -> Optional[ModuleInfo]: ...
4040

4141
def getmembers(object: object,
42-
predicate: Callable[[Any], bool] = ...,
42+
predicate: Optional[Callable[[Any], bool]] = ...,
4343
) -> List[Tuple[str, Any]]: ...
4444
def getmodulename(path: str) -> Optional[str]: ...
4545

0 commit comments

Comments
 (0)