-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Fix a bug where inline configurations of error codes would lose their values if accompanied by another inline configuration. #19075
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
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
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.
Thanks, looks great! And the problem is rather annoying. Added one nit below.
Co-authored-by: Stanislav Terliakov <[email protected]>
This comment has been minimized.
This comment has been minimized.
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅ |
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.
Thanks!
The following code produces a name-defined code error, despite our instructions. How can it be?!
The answer is, there was a bug that caused all inline configurations, even those that didn't specify any enable/disables, to overwrite the lists of enable/disables. I have now fixed that. I've also added some tests.
Closes #12342 — I discovered this problem while investigating the last foible of issue #12342 (itself of tangential interest to something else I was doing), which can now be closed.