-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Print and show error end locations #13148
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
2 similar comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
@JukkaL All tests pass finally, you can review this now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! This makes error reporting more user friendly, and tracking the end line/column could be useful for other things as well in the future.
Using the flag
--show-error-end
the errors will be output likefile:line:column:end_line:end_column
, for example:This will be helpful for various tools to highlight error location. Also when run with
--pretty
mypy itself will highlight the full span of error context (except if it spans multiple lines, like Python 3.11 itself does). Examples: