inspect: get{doc,comments,module,sourcefile} can return None (#3137)

This commit is contained in:
Ville Skyttä
2019-07-24 23:05:02 +03:00
committed by Sebastian Rittau
parent 9a7b286c66
commit bf50612d76
2 changed files with 8 additions and 8 deletions

View File

@@ -80,11 +80,11 @@ def ismemberdescriptor(object: object) -> bool: ...
def findsource(object: object) -> Tuple[List[str], int]: ...
def getabsfile(object: object) -> str: ...
def getblock(lines: Sequence[str]) -> Sequence[str]: ...
def getdoc(object: object) -> str: ...
def getcomments(object: object) -> str: ...
def getdoc(object: object) -> Optional[str]: ...
def getcomments(object: object) -> Optional[str]: ...
def getfile(object: object) -> str: ...
def getmodule(object: object) -> ModuleType: ...
def getsourcefile(object: object) -> str: ...
def getmodule(object: object) -> Optional[ModuleType]: ...
def getsourcefile(object: object) -> Optional[str]: ...
# TODO restrict to "module, class, method, function, traceback, frame,
# or code object"
def getsourcelines(object: object) -> Tuple[List[str], int]: ...