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
Implement B006 #515
Implement B006 #515
Conversation
Signed-off-by: harupy <hkawamura0130@gmail.com>
@@ -887,6 +891,7 @@ impl CheckCodePrefix { | |||
CheckCodePrefix::B0 => PrefixSpecificity::Hundreds, | |||
CheckCodePrefix::B00 => PrefixSpecificity::Tens, | |||
CheckCodePrefix::B002 => PrefixSpecificity::Explicit, | |||
CheckCodePrefix::B006 => PrefixSpecificity::Explicit, |
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.
@harupy - BTW -- any thoughts on the approach I took to this problem? I.e., code-generating the prefix map, to allow static enums everywhere?
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.
How does flake8 implement this?
resources/test/fixtures/B006.py
Outdated
@@ -0,0 +1,61 @@ | |||
import collections |
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.
Could we instead use the test suite from flake8-bugbear? https://github.com/PyCQA/flake8-bugbear/blob/main/tests/b006_b008.py
Awesome, a couple comments! |
See #389