inspect.Traceback/FrameInfo index/code_context attributes now Optional[] (#3265)

Resolves #3264
This commit is contained in:
Árni Már Jónsson
2019-09-26 15:13:00 +00:00
committed by Sebastian Rittau
parent c33239b011
commit e0cc8bdafb
2 changed files with 7 additions and 7 deletions

View File

@@ -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: ...