Skip to content

FURB171: Auto-fix deletes comments #10063

@mrcljx

Description

@mrcljx
answer = 1
test = answer in (
  # needs special handling
  42,
)
ruff --fix --isolated --preview --select FURB171 file.py

Result (comment is gone)

answer = 1
test = answer == 42

Ruff Version: 0.2.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfixesRelated to suggested fixes for violations

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions