Skip to content

Commit b9c5e81

Browse files
1 parent bfe0b06 commit b9c5e81

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

Diff for: stdlib/3/types.pyi

+13-4
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,19 @@ class BuiltinFunctionType:
152152
BuiltinMethodType = BuiltinFunctionType
153153

154154
class TracebackType:
155-
tb_frame = ... # type: FrameType
156-
tb_lasti = ... # type: int
157-
tb_lineno = ... # type: int
158-
tb_next = ... # type: TracebackType
155+
if sys.version_info >= (3, 7):
156+
def __init__(self, tb_next: Optional[TracebackType], tb_frame: FrameType, tb_lasti: int, tb_lineno: int) -> None: ...
157+
tb_next: Optional[TracebackType]
158+
else:
159+
@property
160+
def tb_next(self) -> Optional[TracebackType]: ...
161+
# the rest are read-only even in 3.7
162+
@property
163+
def tb_frame(self) -> FrameType: ...
164+
@property
165+
def tb_lasti(self) -> int: ...
166+
@property
167+
def tb_lineno(self) -> int: ...
159168

160169
class FrameType:
161170
f_back = ... # type: FrameType

0 commit comments

Comments
 (0)