-
Notifications
You must be signed in to change notification settings - Fork 109
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
Change B038 to B909 and make it optional #456
Conversation
B038 lead to some false positives that stem from methods defined in the standard library that have the same name as mutating functions for container types like lists and dicts. Thus we decided to make this rule optional. See PyCQA#455 for the related discussion.
Yes, but lets mark 38 as to skip / not use as people might have it already blocked in their configs now ...
Good question, we've always just been adhoc. Generally if there's a good chance majority of people don't need / want / the lint will be too noisy unless helped / tweaked it should be optional. Happy for others to chime in with a more concrete definition. We can add it into the README etc. if we want too. I'll try review this today.. |
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.
LGTM - I just wonder if we should care about 'denylisting' b038 or just try to remember to not use it for next new check?
When B028 was renamed to B907, we reused B028. Not sure if we can get any analytics on whether that was the correct decision or not (i.e. how many people still have B028 in their ignore list), but I definitely think that if we decide to skip it, it should be included in the code base without any implementation so we don't forget. |
Just noticed this when looking at this PR, but B907 isn't included in the I'm curious at how the noise was reduced when it isn't even in the list, is it somehow still disabled anyway? |
I'd prefer to not reuse the code, we're in no danger of running out of error codes. We can introduce some mechanism in the code to make sure the code stays reserved. |
I've looked into this some more, and it seems like the |
While writing this up, I was thinking about making this optional and have two questions:
B038 lead to some false positives that stem from methods defined in the standard library that have the same name as mutating functions for container types like lists and dicts.
Thus we decided to make this rule optional.
See #455 for the related discussion.
Closes #455