Files
openide/python/python-psi-impl/resources/inspectionDescriptions/PyComparisonWithNoneInspection.html
Louis Vignierandintellij-monorepo-bot 1869ec9da6 [codeInspection] Fix python inspection descriptions
GitOrigin-RevId: 56876a5dd073a06c3fcc92f63ed1f5674830bc25
2023-04-28 13:13:25 +00:00

23 lines
426 B
HTML

<html>
<body>
<p>Reports comparisons with <code>None</code>. That type of comparisons
should always be done with <code>is</code> or <code>is not</code>, never
the equality operators.</p>
<p><b>Example:</b></p>
<pre><code>
a = 2
if a == None:
print("Success")
</code></pre>
<p>Once the quick-fix is applied, the code changes to:</p>
<pre><code>
a = 2
if a is None:
print("Success")
</code></pre>
</body>
</html>