We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6c0880a commit fec93e8Copy full SHA for fec93e8
pyp.py
@@ -653,8 +653,12 @@ def code_for_line(lineno: int) -> str:
653
if fs.filename == "<pyp>":
654
if fs.lineno is None:
655
raise AssertionError("When would this happen?")
656
- fs._line = code_for_line(fs.lineno) # type: ignore[attr-defined]
657
- fs.lineno = "PYP_REDACTED" # type: ignore[assignment]
+ if sys.version_info >= (3, 13):
+ fs._lines = code_for_line(fs.lineno) # type: ignore[attr-defined]
658
+ fs.colno = None
659
+ else:
660
+ fs._line = code_for_line(fs.lineno) # type: ignore[attr-defined]
661
+ fs.lineno = "PYP_REDACTED" # type: ignore[assignment]
662
663
tb_format = tb_except.format()
664
assert "Traceback (most recent call last)" in next(tb_format)
0 commit comments