mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +08:00
inspect.Traceback/FrameInfo index/code_context attributes now Optional[] (#3265)
Resolves #3264
This commit is contained in:
committed by
Sebastian Rittau
parent
c33239b011
commit
e0cc8bdafb
@@ -109,12 +109,12 @@ Traceback = NamedTuple(
|
||||
('filename', str),
|
||||
('lineno', int),
|
||||
('function', str),
|
||||
('code_context', List[str]),
|
||||
('index', int),
|
||||
('code_context', Optional[List[str]]),
|
||||
('index', Optional[int]),
|
||||
]
|
||||
)
|
||||
|
||||
_FrameInfo = Tuple[FrameType, str, int, str, List[str], int]
|
||||
_FrameInfo = Tuple[FrameType, str, int, str, Optional[List[str]], Optional[int]]
|
||||
|
||||
def getouterframes(frame: FrameType, context: int = ...) -> List[_FrameInfo]: ...
|
||||
def getframeinfo(frame: Union[FrameType, TracebackType], context: int = ...) -> Traceback: ...
|
||||
|
||||
Reference in New Issue
Block a user