Comment by sa46
10 hours ago
The problem is that pre-commit hooks are much slower with a much higher false-positive rate than type checking.
Pre-commit checks should be opt-in with CI as the gate. It's useful to be able to commit code in a failing state.
No one forces you to install the pre-commit hook on your local checkout so what you're suggesting is universally the case. You're perfectly free to just run it manually or let it fail in CI or use `--no-verify` when committing to skip the hook if you install it.