typing: fix/adjust _code.source.getfslineno
This commit is contained in:
parent
a52f791461
commit
62db3f7abc
|
@ -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).
|
||||
|
||||
|
|
Loading…
Reference in New Issue