Skip to content

PLR1736 does not account for custom start index #12594

Closed
@pork-you-pine

Description

@pork-you-pine

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions