Mark inspect.getmembers as Optional for both Py2 and Py3 (#2172)

This commit is contained in:
Mathieu Leduc-Hamel authored and Jelle Zijlstra committed 2018-05-29 10:43:34 -07:00
1 parent da7b04904c
commit 351d019241
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -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]: ...
+1 -1
View File
@@ -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]: ...