Derived from the Pylint linter.
What it does#
Checks for the use of unnamed numerical constants ("magic") values in comparisons.
Why is this bad?#
The use of "magic" values can make code harder to read and maintain, as readers will have to infer the meaning of the value from the context. Such values are discouraged by PEP 8.
For convenience, this rule excludes a variety of common values from the
"magic" value definition, such as