-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 flake8-bugbear #389
Comments
Link to bugbear warnings for reference: https://github.com/PyCQA/flake8-bugbear#list-of-warnings B001, B002, B006, B007, B008, B017, B023, and B904 are the most useful for catching real bugs imho, out of the warnings that are not yet implemented. B950 covers line length - it is not really necessary since (awesome project by the way!) |
Cool, those are all pretty straightforward! Will prioritize them over the others. |
I'm working on B006 implementation. |
Quick checklist for convenience:
Opinionated:
|
That's awesome, thank you for collating it! I'm tentatively marking B001 and B950 as complete, since IIUC B001 is the same as E722, and B950 is close enough to E501 that we may not support it independently (I know they're not exactly the same). |
Just updated the list as @harupy is making awesome progress here. We're now at 50% coverage. |
@charliermarsh for |
Test 0.0.120 and problem solved. Thx |
@harupy is dangerously close to implementing the entire plugin ;) |
Nice to see a task list with lots of ✅ :) |
I think if we implement B023, we should feel comfortable closing this. |
Agreed! Feel free to implement it if anyone wants to :) |
@harupy - Sounds good, I can give it a try! |
Awesome, thank you! |
Is |
@harupy - Yeah I believe so. |
B905 was just added:
|
@charliermarsh Are there still plans on supporting |
We could support it. I was a bit hesitant but we could. Can you talk me through the rationale of using B950 vs. just configuring E501 to use a 10% increase? I think they're exactly equivalent, so I'm guessing it's more of a philosophical thing? |
I wouldn't call it philosophical, it mostly comes down to personal preference and experience. I think a line length of |
Sorry -- didn't intend "philosophical" to come off as pejorative so apologies if it did. Was mostly trying to confirm that, functionally, using Assuming that's correct, is the difference here that if you treat |
No offense taken whatsoever. The latter is exactly what I meant to say. |
@charliermarsh Would you be open to implementing |
Thanks @ocefpaf for the suggestions and the fact that I could swipe the actions config from erddapy. Needed to tweak bugbear settings to play nice with FastAPI. astral-sh/ruff#389
This is a big set of rules but
flake8-bugbear
is extremely popular (~1.5M downloads per month).The text was updated successfully, but these errors were encountered: