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

B018 does not detect module level useless expressions

Open graingert opened this issue 3 years ago • 0 comments

with the following:

def ham():
    pass


["hello", "world"]

when running pipx run --spec="flake8-bugbear" flake8 fluke8.py --include="B018", I expected to see:

flake8.py:5:1: B018 Found useless expression. Either assign it to a variable or remove it.

graingert avatar Jul 01 '22 09:07 graingert