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

PLR1736 does not account for custom start index #12594

Closed
pork-you-pine opened this issue Jul 31, 2024 · 1 comment · Fixed by #12603
Closed

PLR1736 does not account for custom start index #12594

pork-you-pine opened this issue Jul 31, 2024 · 1 comment · Fixed by #12603
Assignees
Labels
bug Something isn't working

Comments

@pork-you-pine
Copy link

Hi there, it seems like PLR1736 does not account for custom start indices in enumerate and transforms:

def foo(some_list: list[int]):
    for index, list_item in enumerate(some_list, start=1):
        print(some_list[index])

into:

def foo(some_list: list[int]):
    for index, list_item in enumerate(some_list, start=1):
        print(list_item)

Used command:
ruff check path/to/file.py --fix --isolated --select PL

Version:
ruff 0.5.5

@charliermarsh charliermarsh added the bug Something isn't working label Jul 31, 2024
@charliermarsh
Copy link
Member

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants