ruff¶
A Dagger module for linting and formatting Python code with Ruff.
It exposes two sub-objects — a checker (ruff check) and a formatter
(ruff format) — each with a lint check and a fix generate function that returns a
Changeset.
Installation¶
Usage¶
Checks¶
Run the linter:
Auto-fix¶
ruff version detection¶
When you pass a --source directory the module auto-detects the ruff version from
(in order):
uv.lock— the pinned package versionruff.toml/.ruff.toml—required-versionpyproject.toml—[tool.ruff].required-version
You can override this with --version or supply your own --ctr.