Inspectopedia
 
2024.3

Using equality operators to compare with None

Info
New
Last modified: 03 December 2024

Reports comparisons with None. That type of comparisons should always be done with is or is not, never the equality operators.

Example:

Once the quick-fix is applied, the code changes to: