typing: fix/adjust _code.source.getfslineno

This commit is contained in:
Daniel Hahler 2020-01-21 19:27:57 +01:00
parent a52f791461
commit 62db3f7abc
1 changed files with 1 additions and 1 deletions

View File

@ -282,7 +282,7 @@ def compile_( # noqa: F811
return s.compile(filename, mode, flags, _genframe=_genframe)
def getfslineno(obj) -> Tuple[Union[str, py.path.local], int]:
def getfslineno(obj) -> Tuple[Optional[Union["Literal['']", py.path.local]], int]:
""" Return source location (path, lineno) for the given object.
If the source cannot be determined return ("", -1).