useless-expression (B018)#
Derived from the flake8-bugbear linter.
What it does#
Checks for useless expressions.
Why is this bad?#
Useless expressions have no effect on the program, and are often included by mistake. Assign a useless expression to a variable, or remove it entirely.
Example#
Use instead: