Add strict-kwargs pre-commit hook in fix mode#3004
Conversation
17bd710 to
d899649
Compare
d899649 to
aeb3609
Compare
aeb3609 to
75578bb
Compare
75578bb to
f82dbe0
Compare
9245fcc to
db1978c
Compare
db1978c to
95cc17f
Compare
9cb5192 to
fcd8ff5
Compare
8c2753e to
7f27d1b
Compare
| additional_dependencies: | ||
| - *uv_version | ||
| stages: [pre-commit] | ||
| require_serial: true |
There was a problem hiding this comment.
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)
Reviewed by Cursor Bugbot for commit 7f27d1b. Configure here.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 96d519c. Configure here.


Summary
rev: 2026.5.18) withargs: [fix]so positional call arguments are rewritten to keyword form on commit.[tool.mypy_strict_kwargs]into[tool.strict_kwargs]where custom ignore lists already exist.Test plan
pre-commit run strict-kwargs --all-filesNote
Low Risk
Low risk: adds a new local pre-commit auto-fixer and a dev dependency, without changing runtime/library code paths.
Overview
Adds a new pre-commit hook,
strict-kwargs-fix, that runsstrict-kwargs fixon Python files (serialized viarequire_serial) to automatically rewrite positional call arguments into keyword form.Updates pre-commit CI to skip this hook, and pins
strict-kwargs==2026.5.18.post1inpyproject.tomlunder dev dependencies so the hook can be executed viauv run.Reviewed by Cursor Bugbot for commit 9aa039f. Bugbot is set up for automated code reviews on this repo. Configure here.