Skip to content
Merged
12 changes: 12 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,17 @@ 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 @@ -82,6 +82,7 @@ optional-dependencies.dev = [
# See: https://vws-python.github.io/vws-python-mock/installation.html#faster-installation
"torch>=2.5.1",
"torchvision>=0.20.1",
"strict-kwargs==2026.5.18",
"ty==0.0.36",
"types-requests==2.33.0.20260513",
"vulture==2.16",
Expand Down
Loading