vetkit.py.quality.compare-to-none
Comparison to None with ==/!= can be overridden by __eq__; use is / is not.
Last updated:
Suite: Code quality
python
Comparison to None with ==/!= can be overridden by __eq__; use is / is not.
Category: QUALITY · Engine rule severity: INFO
How to fix it
Write x is None or x is not None.
References
Source: packages/engine/rules/quality/python.yml.
Generated from shipped rule definitions at build time. Matching is a review signal, not proof of exploitability. “generic” denotes text matching, not complete language or framework coverage. Runtime configuration and available tools affect whether a rule runs.