Skip to content
Merged
11 changes: 11 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ ci:
skip:
- actionlint
- sphinx-lint
- strict-kwargs-fix
- check-manifest
- deptry
- doc8
Expand Down Expand Up @@ -299,6 +300,16 @@ repos:
- *uv_version
stages: [pre-commit]

- id: strict-kwargs-fix
name: strict-kwargs
entry: uv run --extra=dev strict-kwargs fix
language: python
types_or: [python]
additional_dependencies:
- *uv_version
stages: [pre-commit]
require_serial: true
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixer hook placed after formatter causes extra passes

Medium Severity

The strict-kwargs-fix hook is positioned after ruff-format-fix in the hook execution order. Since strict-kwargs fix rewrites positional arguments to keyword form (e.g., adding name= prefixes), it lengthens lines. The formatter that would wrap these lines has already run, so the output may violate line-length rules, requiring an additional pre-commit pass to converge. The established pattern in this config places code-modifying fixers (pydocstringformatter, ruff-check-fix) before the formatter (ruff-format-fix).

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 7f27d1b. Configure here.


- id: doc8
name: doc8
entry: uv run --extra=dev -m doc8
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ optional-dependencies.dev = [
"sphinx-pyproject==0.3.0",
"sphinx-substitution-extensions==2026.1.12",
"sphinxcontrib-spelling==8.0.2",
"strict-kwargs==2026.5.18.post1",
"sybil==9.3.0",
# Listed explicitly (despite being transitive via vws-python-mock) so that
# [tool.uv.sources] can redirect to the CPU-only PyTorch index.
Expand Down
Loading