-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(🎁) new rule: unconditional-break
/unconditional-continue
within loop
#6587
Comments
unconditional-break
within for
loopunconditional-break
within loop
unconditional-break
within loopunconditional-break
/unconditional-continue
within loop
It makes sense, though my concern is that the rule may have low precision. It's probably not a very common error, and when it does appear in code, I can see situations in which it may be intentional. For example: for a in some_list():
use_the_first_element(a)
break I guess you could do this by slicing, or with |
For reference this is covered by I would say that a single |
The
break
here is completely invalid and is most certainly a developer mistake.The text was updated successfully, but these errors were encountered: