2.home-manager/treefmt.toml
Austin Horstman fea021792d treefmt: format Python with ruff
Add ruff to the tree formatter so Python sources are kept consistently
formatted by 'nix fmt' and the CI format check. Test fixtures under
tests/modules are excluded since some are intentionally invalid Python.
Reformats the existing lib/python and tests scripts accordingly.
2026-06-19 10:00:25 -05:00

36 lines
775 B
TOML

on-unmatched = "info"
tree-root-file = "release.json"
[formatter.nixfmt]
command = "nixfmt"
includes = [ "*.nix" ]
[formatter.statix]
command = "treefmt-statix"
includes = [ "*.nix" ]
[formatter.deadnix]
command = "deadnix"
options = [ "--edit" ]
includes = [ "*.nix" ]
[formatter.nixf-diagnose]
command = "nixf-diagnose"
options = [
"--auto-fix",
"--ignore=sema-unused-def-lambda-witharg-formal",
"--ignore=sema-unused-def-lambda-noarg-formal",
"--ignore=sema-primop-overridden"
]
includes = [ "*.nix" ]
[formatter.ruff]
command = "ruff"
options = [ "format" ]
includes = [ "*.py" ]
# Test fixtures are sample inputs (some intentionally invalid Python).
excludes = [ "tests/modules/**/*.py" ]
[formatter.keep-sorted]
command = "keep-sorted"
includes = [ "*" ]