flake8-bugbear icon indicating copy to clipboard operation
flake8-bugbear copied to clipboard

New rule to check delattr with constant

Open fennr opened this issue 5 months ago • 1 comments

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.

fennr avatar May 28 '25 12:05 fennr

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.

cooperlees avatar May 28 '25 21:05 cooperlees

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...

JelleZijlstra avatar Sep 08 '25 21:09 JelleZijlstra