mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
Fix traceback.FrameSummary's "line" parameter (#2470)
traceback.FrameSummary's "line" parameter is a string that is the text of a line of code, not an int that is the line number of a line of code.
This commit is contained in:
committed by
Jelle Zijlstra
parent
eb09e2898b
commit
cca6ee43e6
@@ -90,8 +90,6 @@ if sys.version_info >= (3, 5):
|
||||
def format(self, *, chain: bool = ...) -> Generator[str, None, None]: ...
|
||||
def format_exception_only(self) -> Generator[str, None, None]: ...
|
||||
|
||||
|
||||
if sys.version_info >= (3, 5):
|
||||
class FrameSummary(Iterable):
|
||||
filename: str
|
||||
lineno: int
|
||||
@@ -101,7 +99,7 @@ if sys.version_info >= (3, 5):
|
||||
def __init__(self, filename: str, lineno: int, name: str,
|
||||
lookup_line: bool = ...,
|
||||
locals: Optional[Mapping[str, str]] = ...,
|
||||
line: Optional[int] = ...) -> None: ...
|
||||
line: Optional[str] = ...) -> None: ...
|
||||
# TODO: more precise typing for __getitem__ and __iter__,
|
||||
# for a namedtuple-like view on (filename, lineno, name, str).
|
||||
def __getitem__(self, i: int) -> Any: ...
|
||||
|
||||
Reference in New Issue
Block a user