Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extend showsyntaxerror for SyntaxError subclasses #997

Merged
merged 1 commit into from
May 14, 2024

Conversation

bdieterm
Copy link
Collaborator

When executing only selected lines, the line number is corrected for syntax errors. But this did not work for subclasses of SyntaxError, such as IndentationError.

For example, when running the middle cell of

pass
##

if True:
pass

##

The error message contained File "<tmp 1>+2", line 3.

After this fix, the corrected line number will be displayed in the error message:
File "<tmp 1>", line 5

@bdieterm bdieterm merged commit e5d215a into pyzo:main May 14, 2024
16 checks passed
@bdieterm bdieterm deleted the fixSyntaxError2 branch June 23, 2024 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant