true-false-comparison (E712)#
Derived from the pycodestyle linter.
Fix is always available.
What it does#
Checks for comparisons to booleans which are not using the is
operator.
Why is this bad?#
According to PEP 8, "Comparisons to singletons like None should always be done with is or is not, never the equality operators."
Example#
Use instead: