Repository navigation
The pre-commit hook runs its python checks once per project and takes the staged .py files only, so a staged pyproject.toml only marks the project as python and never reaches ruff, black, isort, or mypy. The python tools and the spell check receive every file name after --, so a staged python file whose name starts with a dash no longer blocks the commit. The first ruff check runs with --no-fix so a project config cannot rewrite files on its own, and a ruff error that ruff check --fix cannot clear blocks the commit.
After a formatter rewrites a staged file, the hook stages only the files it rewrote and blocks the commit when a rewritten file held unstaged edits, and black and isort follow the same rule when ruff is missing. A failed fix, format, or staging step blocks the commit with a red line, and the hook always reaches its summary line. The hook and its test file carry no comments, and shfmt formats the hook.