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

SyntaxError messages just say 'invalid syntax' instead of the provided hints #54

Open
Uchiha-Senju opened this issue May 19, 2023 · 1 comment

Comments

@Uchiha-Senju
Copy link

Issue

When printing a syntax error, the exception includes a help message in the msg attribute, but the message in args[0] is printed instead, which is almost always "invalid syntax" and unhelpful.

Currently:
image

Ideally :
image

Suggested Fix :

Changing line 682 in init.py from exception_value.args = [exception_value.args[0]] to exception_value.args = [exception_value.msg]

@aymuos15
Copy link

could you possibly PR this?

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

No branches or pull requests

2 participants