mirror of
https://github.com/python/cpython.git
synced 2025-11-29 22:41:59 +00:00
gh-137576: Fix for Basic REPL showing incorrect code in tracebacks with PYTHONSTARTUP (#137625)
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
This commit is contained in:
parent
8b8bd3d4ad
commit
04f8ef663b
4 changed files with 90 additions and 3 deletions
|
|
@ -541,7 +541,7 @@ class StackSummary(list):
|
|||
colorize = kwargs.get("colorize", False)
|
||||
row = []
|
||||
filename = frame_summary.filename
|
||||
if frame_summary.filename.startswith("<stdin>-"):
|
||||
if frame_summary.filename.startswith("<stdin-") and frame_summary.filename.endswith('>'):
|
||||
filename = "<stdin>"
|
||||
if colorize:
|
||||
theme = _colorize.get_theme(force_color=True).traceback
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue