Problem
Since deeb798 ("chore: prepare 0.4.0 release"), the style CI job fails on every PR with:
Pretty format TOML.......................................................Failed
File uv.lock is not pretty-formatted
Root cause
The pretty-format-toml pre-commit hook runs with --all-files and checks uv.lock. But uv rewrites the whole lock file in its own canonical style (4-space indent, { url = ... }, trailing commas) every time it regenerates it, which is incompatible with the hook's style (2-space indent, {url = ...}, no trailing commas).
deeb798 bumped the project version, which regenerated uv.lock in uv's native format (the only semantic change was version = "0.3.3" -> "0.4.0"; the other ~800 changed lines are pure reformatting). Since pre-commit wasn't run before committing, main's uv.lock no longer satisfies the hook, and every PR based on main fails the style job through no fault of its own (e.g. #44 had to include an unrelated 827-line uv.lock reformat commit to go green).
The two formats are mutually exclusive: any future uv lock run (dependency upgrade, release version bump) will wipe out the hook's formatting again, so this will keep recurring as long as the hook covers uv.lock.
Proposed fix
Exclude uv.lock from the pretty-format-toml hook. Lock files are machine-generated and machine-consumed; uv already produces deterministic output, and reformatting them only creates noise and this exact CI deadlock. This matches common practice of excluding lock files (uv.lock, Cargo.lock, poetry.lock) from formatters.
Problem
Since
deeb798("chore: prepare 0.4.0 release"), thestyleCI job fails on every PR with:Root cause
The
pretty-format-tomlpre-commit hook runs with--all-filesand checksuv.lock. Butuvrewrites the whole lock file in its own canonical style (4-space indent,{ url = ... }, trailing commas) every time it regenerates it, which is incompatible with the hook's style (2-space indent,{url = ...}, no trailing commas).deeb798bumped the project version, which regenerateduv.lockin uv's native format (the only semantic change wasversion = "0.3.3" -> "0.4.0"; the other ~800 changed lines are pure reformatting). Since pre-commit wasn't run before committing, main'suv.lockno longer satisfies the hook, and every PR based on main fails the style job through no fault of its own (e.g. #44 had to include an unrelated 827-lineuv.lockreformat commit to go green).The two formats are mutually exclusive: any future
uv lockrun (dependency upgrade, release version bump) will wipe out the hook's formatting again, so this will keep recurring as long as the hook coversuv.lock.Proposed fix
Exclude
uv.lockfrom thepretty-format-tomlhook. Lock files are machine-generated and machine-consumed; uv already produces deterministic output, and reformatting them only creates noise and this exact CI deadlock. This matches common practice of excluding lock files (uv.lock,Cargo.lock,poetry.lock) from formatters.