Skip to content

Deprecate Flake8, Use Ruff Instead #2793

@lighting9999

Description

@lighting9999

The main reasons for deprecating flake8 checks and switching to ruff checks are as follows:

  • Faster speed: Ruff is written in Rust and runs much faster than Python-based flake8. Especially in large projects, it can significantly improve code checking efficiency and reduce waiting time.

    - More comprehensive function integration: Ruff has a large number of built-in common checking rules (covering the functions of flake8 and most of its plugins), eliminating the need to install multiple additional plugins, which simplifies configuration and dependency management.
  • Active maintenance and updates: Ruff is a relatively new tool with a highly active community and frequent updates. It can quickly adapt to new Python features and fix issues, while flake8 has a relatively slower maintenance rhythm.
  • Automatic repair capability: Ruff supports automatic repair of various code problems (such as formatting, simple syntax correction, etc.) and can directly modify the code to comply with specifications, while flake8 mainly provides check prompts, and repairs need to be done manually.

In summary, Ruff has more advantages in terms of efficiency, convenience and scalability, and has gradually become the preferred code checking tool for modern Python projects.

So,I suggest that it is necessary to modify the workflow file to deprecate flake8 and use ruff (you can also not fully deprecate flake8), and then update the workflow syntax version to around 3.12.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions