Created
October 5, 2026 22:13
-
-
Save gardner/22f2fb13cf2103f7a0197437dfa71bc8 to your computer and use it in GitHub Desktop.
.pre-commit-config.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| repos: | |
| - repo: local | |
| hooks: | |
| - id: file-length | |
| name: Maximum 500 lines per Python source file | |
| entry: uv run --locked python scripts/check_file_length.py | |
| args: [--max-lines, "500"] | |
| language: system | |
| files: \.py$ | |
| exclude: (^|/)(tests?(/|\.py$)|test_[^/]*\.py$|[^/]*_test\.py$|conftest\.py$) | |
| types: [python] | |
| - id: ruff | |
| name: Ruff lint and McCabe complexity | |
| entry: uv run --locked ruff check --fix | |
| language: system | |
| types_or: [python, pyi] | |
| files: ^(src|tests|scripts)/ | |
| - id: ruff-format | |
| name: Ruff format | |
| entry: uv run --locked ruff format | |
| language: system | |
| types_or: [python, pyi] | |
| files: ^(src|tests|scripts)/ | |
| - id: pyright | |
| name: Pyright type checking | |
| entry: uv run --locked pyright | |
| language: system | |
| pass_filenames: false | |
| files: ^(src/|tests/|scripts/|pyproject\.toml$|uv\.lock$) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment