12 E402 [ ] Module level import not at top of file
31 E701 [ ] Multiple statements on one line (colon)
116 E722 [ ] Do not use bare `except`
2 E741 [ ] Ambiguous variable name: `l`
55 F401 [*] `packman.molecule` imported but unused
7 F403 [ ] `from .molecule import *` used; unable to detect undefined names
13 F841 [*] Local variable `new_coords` is assigned to but never used
%
ruff --select=E711,E712 --fix .
# and manually fixed ruff rule F402%
ruff rule E711
none-comparison (E711)
Derived from the pycodestyle linter.
Autofix is always available.
What it does
Checks for comparisons to
None
which are not using theis
operator.Why is this bad?
Per PEP 8, "Comparisons to singletons like None should always be done with is or is not, never the equality operators."
Example
Use instead:
References
PEP 8
%
ruff rule E712
true-false-comparison (E712)
Derived from the pycodestyle linter.
Autofix is always available.
What it does
Checks for comparisons to booleans which are not using the
is
operator.Why is this bad?
Per PEP 8, "Comparisons to singletons like None should always be done with is or is not, never the equality operators."
Example
Use instead:
References
PEP 8
%
ruff rule F402
import-shadowed-by-loop-var (F402)
Derived from the Pyflakes linter.
Message formats:
Import
{name}
from line {line} shadowed by loop variableWhat remains to be fixed?
%
ruff --exit-zero --line-length=1100 --target-version=py37 --statistics . | sort -k 2