useless-else-on-loop / W0120ΒΆ
Message emitted:
Else clause on loop without a break statement, remove the else and de-indent all the code inside it
Description:
Loops should only have an else clause if they can exit early with a break statement, otherwise the statements under else should be on the same scope as the loop itself.
Created by basic
checker