ruff: Implement flake8-bugbear
This is a big set of rules but flake8-bugbear
is extremely popular (~1.5M downloads per month).
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 34 (26 by maintainers)
This is a big set of rules but flake8-bugbear
is extremely popular (~1.5M downloads per month).
@charliermarsh Would you be open to implementing
B950
? It’s the only thing missing for me coming from flake8. I could give it a try, but I have no rust experience (yet?).@harupy is dangerously close to implementing the entire plugin 😉
Nice to see a task list with lots of ✅ 😃
@g-as – Added in https://github.com/charliermarsh/ruff/pull/1122.
Just updated the list as @harupy is making awesome progress here. We’re now at 50% coverage.
Quick checklist for convenience:
assert False
callsOpinionated:
I’m working on B006 implementation.
@SRv6d to make
E501
behave likeB950
I am just using this:B905 was just added:
I think if we implement B023, we should feel comfortable closing this.
If that is the issue, it’ll be fixed by https://github.com/charliermarsh/ruff/pull/739.
I may have forgotten to include the bugbear settings in the hash key. (I’m on the subway but can fix in a bit, or if someone wants to PR, check out the hash trait implementation on Settings 😃)
@grillazz +1 to the above suggestion. This is the result I get from running on https://github.com/grillazz/fastapi-sqlalchemy-asyncpg’s
main
branch with the configuration you shared:@grillazz Can you try running
ruff --no-cache ...
?@grillazz - This is now supported thanks to @edgarrmondragon. So now you can add this to your
pyproject.toml
:(Going out in v0.0.115 which is building now.)
@grillazz It’s rather straightforward to add. ~I’m working on it~. PR is https://github.com/charliermarsh/ruff/pull/706 🙂
@charliermarsh for
B008
is there any simple way to setupextend-immutable-calls = fastapi.Depends, fastapi.params.Depends
?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).