Skip to content

Conversation

@kieran-ryan
Copy link

@kieran-ryan kieran-ryan commented Dec 22, 2025

Replace flake8 with ruff for linting Python code.

Context

  • Closes Add Flake8 problem matcher #511

  • Formats and enforces quote formatting - which was configured within the preceding flake8 configuration file though required flake8 plugins which were not declared within the repository or linted within CI - so thus required fixing. Automatically applied using ruff check --select=Q --fix.

Replace flake8 with ruff for linting Python code.

See ruff's default configuration for documentation on default rule disparity with flake8.

# Ruff's default configuration - https://docs.astral.sh/ruff/configuration/
[tool.ruff.lint]
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or
# McCabe complexity (`C901`) by default.
select = ["E4", "E7", "E9", "F"]
  • Automated linting fixes.
  • pyproject.toml support
  • Monorepo support
    • Respects configuration from root and within each package - run poe linter or ruff check from any location
    • IDE support during development - rather than relying on disparities between local task runs, CI, etc.
  • Multiple times faster
  • Hundreds of rules, without requiring external plugins and dependencies
    • Can subsequently be extended for formatting and other linting criteria - though scoped to parity with this pull request
  • and more

Dropped legacy Jenkins linting configuration.

Checklist

- GitHub inline linting annotations.
- Resolve pre-existing quotation issues.
- Replace flake8 with ruff and monorepo configuration.
@kieran-ryan kieran-ryan force-pushed the debt/ruff-linting branch 2 times, most recently from 46afce6 to 8038393 Compare December 29, 2025 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant