Skip to content

Invalid fix for PLE1141 #13343

@martinlehoux

Description

@martinlehoux
  • I think the autofix is not safe
  • Ruff version: 0.6.4
  • Ruff command: ruff check --preview --fix
d: dict[tuple[int, str], bool] = {}
d[1, "a"] = True

for n, c in d:
    print(n, c)

autofixed to

d: dict[tuple[int, str], bool] = {}
d[1, "a"] = True

for n, c in d.items():
    print(n, c)

Metadata

Metadata

Assignees

No one assigned

    Labels

    previewRelated to preview mode featuresruleImplementing or modifying a lint rule

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions