Skip to content

Commit

Permalink
SONARPY-2005 update wording to exclude in in not for-loops (#4380)
Browse files Browse the repository at this point in the history
  • Loading branch information
Seppli11 authored Oct 8, 2024
1 parent bed254e commit 62638f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rules/S1721/python/rule.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
== Why is this an issue?

Parentheses are not required after the ``++assert++``, ``++del++``, ``++elif++``, ``++except++``, ``++for++``, ``++if++``, ``++in++``, ``++not++``, ``++raise++``, ``++return++``, ``++while++``, and ``++yield++`` keywords, and using them unnecessarily impairs readability. They should therefore be omitted.
Parentheses are not required after the ``++assert++``, ``++del++``, ``++elif++``, ``++except++``, ``++for++``, ``++if++``, ``++not++``, ``++raise++``, ``++return++``, ``++while++``, and ``++yield++`` keywords. Similarly, parentheses are not required after ``++in++`` in a ``++for++`` loop. Using parentheses unnecessarily impairs readability, and therefore, they should be omitted.


=== Noncompliant code example
Expand Down

0 comments on commit 62638f5

Please sign in to comment.