Why this matters
Semicolons are unnecessary in Python and can create visual clutter. They may also lead to errors when combining multiple statements on one line. Use new lines instead.
Check if semicolons are used at the end of statements in Python code. Semicolons are unnecessary and may cause readability issues or errors when multiple statements are placed on one line. Recommend using new lines instead.
Semicolons are unnecessary in Python and can create visual clutter. They may also lead to errors when combining multiple statements on one line. Use new lines instead.
Side-by-side examples engineers can pattern-match during review.
x = 1; y = 2; print(x + y)x = 1
y = 2
print(x + y)
x = 1; y = 2; print(x + y)x = 1
y = 2
print(x + y)
From the same buckets as this rule.
Check if loops use equality operators (== or !=) in termination conditions. These can lead to infinite loops if the condition is never met exactly. Instead, use relational operators like < or > for safer loop termination.