You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For linting the code base move from flake8 to ruff.
Motivation
Performance: Written in Rust, Ruff is often 10–100x faster than traditional Python-based linters like Flake8. This makes it fast enough to run on every file save, providing near-instant feedback during development.
Tool consolidation: Ruff serves as a "Swiss Army knife," replacing not just Flake8 but also isort, pydocstyle, pyupgrade, autoflake, and dozens of popular Flake8 plugins.
Built-in auto-fixing: Ruff can automatically fix many violations, such as removing unused imports or upgrading syntax, using the --fix flag.
Code formatting: Ruff can also be used for code formatting that matches the formatting from black
Doc string linting: Ensure our code documentation is using one style of documentation strings.
Create ruff.toml configuration that lints the code base without any changes to the code base.
Add GitHub action to add ruff linting to workflow
Incrementally enable more ruff rules. Only enable a few rules at a time to limit the size of the pull requests to facilitate code reviews. As mentioned in Automatically format the code base #1584 use .git-blame-ignore-revs to not cause large formatting changes to not muddle up the blame history. Repeat until we feel we have implemented all the rules that we feel are necessary.
For linting the code base move from flake8 to ruff.
Motivation
Related Issues/PRs
Implementation
ruff.tomlconfiguration that lints the code base without any changes to the code base..git-blame-ignore-revsto not cause large formatting changes to not muddle up the blame history. Repeat until we feel we have implemented all the rules that we feel are necessary.