Skip to content

STYLE: Add auto fix to ruff #51814

Closed
@luke396

Description

@luke396

How about add fix/autofix ruff?

I recently worked on STYLE enable ruff TCH and found that ruff reports some error could (eg: Trailing whitespace, ) been easily autofixed, by adding --fix (or more specific flags) as argument to config.

I must admit that these errors can also be fixed manually. However, if the automation does not significantly slow down the process, why not let them be fixed automatically? It is worth noting that automatic fixes are still being developed and modified, and whether they should be used or not may require further discussion.

Some maybe related:
ruff-tried-to-fix-something-but-it-broke-my-code?
Usage - Ruff
Configuration - Ruff

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions