Files
openide/python/python-psi-impl/resources/inspectionDescriptions/PyChainedComparisonsInspection.html
Bas Leijdekkers 9be2dfcea8 escape more less-than characters in inspection description code samples
GitOrigin-RevId: c9096571bbbcf55fc051294d68a9b7b6d4c54836
2021-05-04 09:30:45 +00:00

22 lines
510 B
HTML

<html>
<body>
<p>Reports chained comparisons that can be simplified.</p>
<p><b>Example:</b></p>
<pre><code>
def do_comparison(x):
xmin = 10
xmax = 100
if x >= xmin and x &lt;= xmax:
pass
</code></pre>
<p>The IDE offers to simplify <code>if x >= xmin and x &lt;= xmax</code>.
When the quick-fix is applied, the code changes to:</p>
<pre><code>
def do_comparison(x):
xmin = 10
xmax = 100
if xmin &lt;= x &lt;= xmax:
pass
</code></pre>
</body>
</html>