ruff: A Python linter and code formatter written in Rust.
What problem it solves
Python projects need linting, formatting, rule configuration, and automatic fixes without having to coordinate several separate tools. Ruff combines these workflows behind a common command-line interface and supports configuration, caching, editors, and CI integrations.
Key features
Python linting — Ruff checks Python files and directories for issues covered by its lint rules. Its linter can target the current directory, specific paths, file patterns, or a file containing command-line arguments.
Source: README
Code formatting — Ruff includes a formatter that can process the current directory, selected paths, individual files, or arguments read from a file. Formatting behavior can be configured in the project configuration.
Source: README
Automatic fixes — The linter can automatically correct issues that its rules are able to fix. The README gives unused imports as an example of an automatic correction.
Source: README
Configurable rule selection — Rules and other behavior can be controlled through configuration files or dedicated command-line arguments. Configuration includes options for enabling or disabling rules, discovering files, and setting the logging level.
Source: README, ruff.schema.json
Incremental analysis with caching — Ruff includes caching so that unchanged files do not need to be analyzed again.
Source: README
Quick start
Copied verbatim from the project's README.
# With uv.
uv tool install ruff@latest # Install Ruff globally.
uv add --dev ruff # Or add Ruff to your project.
# With pip.
pip install ruff
# With pipx.
pipx install ruffWho it may suit
Inference: this may suit Python developers who want linting, formatting, automatic fixes, and project configuration in one workflow. It may also suit teams looking to apply the same checks in local development and CI.
Topics to discuss
Which lint rules should be enabled by default as Ruff evolves?
How should configuration be shared across different repository and monorepo layouts?
Which editor and CI workflows should receive continued community attention?
Written by ReadmeX AI from the project's README, source and public GitHub data; it may contain mistakes.
Read the original README https://github.com/astral-sh/ruff#readme
ReadmeX opened this community for a trending project; it is not run by the project. Maintainers can claim it from the community page.
Comments
…