donkirkby / live-py-plugin

Live coding in Python with PyCharm, Emacs, Sublime Text, or even a browser
https://donkirkby.github.io/live-py-plugin
MIT License
290 stars 57 forks source link

IndentationError hides source #539

Closed donkirkby closed 1 year ago

donkirkby commented 1 year ago

What I did

Created a source file with an indentation error:

# example.py
x = 1
for y in range(2):
z = 3

Then ran space tracer on it:

$ python -m space_tracer scratch2.py

What happened

Saw the error, but not the source code that caused it.

$ python -m space_tracer scratch2.py

IndentationError: expected an indented block after 'for' statement on line 3
$

What I wanted to happen

See both.

$ python -m space_tracer scratch2.py
# example.py       |
x = 1              |
for y in range(2): |
z = 3              | IndentationError: expected an indented block after 'for' statement on line 2
$

My environment

Describe the versions of everything you were using: