-
-
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
Improve multiline reporting #15273
Comments
I think this would be great to do. It would help with cases like #11396 where the errors are being somewhat ad hoc reconstructed |
Could you clarify a bit? Current Do we collect the error/note lines before reporting them? Do we create some class that holds the lines? |
@hauntsaninja Can you help clarify the solution? I can pick this up. |
Current multiline error/notice reporting is hacky, e.g.
mypy/mypy/messages.py
Lines 1161 to 1169 in c1fb57d
Notice how
notice
multiple times even as it relates to the same core issueallow_dups=True
to suppress deduplication of, say, the same typeallow_dups=False
, we can effectively dedup when it would make senseI think it'll be better if the extra lines could be part of the error, also reducing code duplication (we end up passing a lot of the same parameters multiple times). Is there a reason why we didn't? Is it a pattern elsewhere in the code?
The text was updated successfully, but these errors were encountered: