Skip to content
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

[Adjust Rule] SIM113: Take care of nested loops #39

Closed
MartinThoma opened this issue Feb 11, 2021 · 0 comments
Closed

[Adjust Rule] SIM113: Take care of nested loops #39

MartinThoma opened this issue Feb 11, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@MartinThoma
Copy link
Owner

Desired change

  • Rule(s): SIM113
  • Adjustment: Don't trigger SIM113 in nested loops if the inner loop is counting

Example

# Code which should NOT trigger SIM113
nb_points = 0
for line in lines:
    for point in line:
        nb_points += 1
@MartinThoma MartinThoma added the enhancement New feature or request label Feb 11, 2021
@MartinThoma MartinThoma self-assigned this Feb 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant