You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
we call notice multiple times even as it relates to the same core issue
we pass allow_dups=True to suppress deduplication of, say, the same type
we mistakenly(?) dedup the "Superclass:" and "Subclass:" notices
by always doing allow_dups=False, we can effectively dedup when it would make sense
I 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:
I think it'll be better if the extra lines could be part of the error
Could you clarify a bit? Current self.fail() and self.note() situation is very granular indeed, but I can't think of any way that would let us abstract it away while also preserving the current amount of flexibility.
Do we collect the error/note lines before reporting them? Do we create some class that holds the lines?
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: