flake8-bugbear
flake8-bugbear copied to clipboard
New rule to check delattr with constant
In discussion https://github.com/astral-sh/ruff/issues/18338 suggested adding a rule similar to B009. If you don't mind, I could send a PR with this rule.
Sure. Please send a PR, adding tests and docs in the README about the new check. Please just take the next available number by the time you get around to implementing it.
This feels out of scope to me: the point of bugbear is to find issues that are likely to indicate bugs in your program, and this issue seems more like a style nit than something to indicate a bug. I guess we already have B009 which is similar though...