.pre-commit-config.yamlā¢4.99 kB
repos:
# ============================================================================
# GENERIC FILE CHECKS
# ============================================================================
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- id: check-json
- id: check-toml
- id: check-merge-conflict
- id: check-case-conflict
- id: check-symlinks
- id: destroyed-symlinks
- id: detect-private-key
# ============================================================================
# PYTHON CHECKS
# ============================================================================
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-ast
- id: check-docstring-first
- id: debug-statements
# ============================================================================
# PYTHON FORMATTING & LINTING
# ============================================================================
- repo: local
hooks:
- id: autoflake
name: autoflake
entry: autoflake
language: python
args: [--in-place, --remove-all-unused-imports]
files: \.py$
additional_dependencies: [autoflake==2.3.1]
- repo: https://github.com/psf/black
rev: 24.10.0
hooks:
- id: black
language_version: python3.13
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.4
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
- repo: https://github.com/pycqa/isort
rev: 7.0.0
hooks:
- id: isort
args: [--profile, black]
- repo: local
hooks:
- id: flake8
name: flake8
entry: flake8
language: python
files: \.py$
additional_dependencies: [flake8==7.1.1]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.13.0
hooks:
- id: mypy
additional_dependencies:
- mcp==1.18.0
- pydantic==2.12.3
- openai==2.6.0
- anthropic==0.71.0
- click==8.3.0
- python-dotenv==1.1.1
- aiosqlite==0.21.0
- pytest==8.4.2
- pytest-asyncio==0.25.3
- types-aiofiles
args: [--config-file=pyproject.toml]
- repo: https://github.com/PyCQA/bandit
rev: 1.7.10
hooks:
- id: bandit
args: [-c, pyproject.toml]
additional_dependencies: ["bandit[toml]"]
- repo: https://github.com/pycqa/pydocstyle
rev: 6.3.0
hooks:
- id: pydocstyle
args: [--convention=google, --add-ignore=D100, D104]
- repo: https://github.com/jendrikseipp/vulture
rev: v2.14
hooks:
- id: vulture
args: [src/]
# ============================================================================
# SHELL SCRIPT CHECKS
# ============================================================================
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1
hooks:
- id: shellcheck
args: [--severity=warning]
# ============================================================================
# OTHER TOOL CHECKS
# ============================================================================
- repo: https://github.com/mrtazz/checkmake
rev: 0.2.2
hooks:
- id: checkmake
args: [--config, .checkmake]
- repo: https://github.com/hadolint/hadolint
rev: v2.12.0
hooks:
- id: hadolint-docker
- repo: https://github.com/adrienverge/yamllint
rev: v1.35.1
hooks:
- id: yamllint
args: [--strict, -d, "{extends: default, rules: {line-length: {max: 140}, document-start: disable}}"]
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.43.0
hooks:
- id: markdownlint
args: [--fix, --config, .markdownlint.json]
# ============================================================================
# SECURITY & DEPENDENCY CHECKS
# ============================================================================
- repo: local
hooks:
- id: pip-audit
name: pip-audit
entry: pip-audit
args: [--skip-editable, --ignore-vuln, GHSA-4xh5-x5gv-qwph]
language: python
additional_dependencies: [pip-audit==2.7.3]
pass_filenames: false
always_run: true
# TODO: Remove GHSA-4xh5-x5gv-qwph ignore when pip 25.3 is released
- id: pipdeptree
name: pipdeptree
entry: pipdeptree
args: [--warn, fail]
language: python
additional_dependencies: [pipdeptree==2.29.0]
pass_filenames: false
always_run: true