mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-10-15 18:42:41 +08:00
inspect.Traceback/FrameInfo index/code_context attributes now Optional[] (#3265)
Resolves #3264
This commit is contained in:
1 parent
c33239b011
commit
e0cc8bdafb
2 files changed
+7
-7
No files matched your search
@@ -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