exclude: ".git|.venv|venv|__pycache__|.pytest_cache"
# Specify Python version to use for all hooks
default_language_version:
python: python3
# Custom CI-specific environment variables
ci:
# Skip hooks that have network timeout issues in CI
skip: [mypy, bandit]
# For pre-commit.ci autofix, we can safely run these hooks
autofix_commit_msg: |
[pre-commit.ci] Auto fixes from pre-commit hooks
For more information, see https://pre-commit.ci
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
exclude: '\.md$'
args: [--markdown-linebreak-ext=md]
- id: end-of-file-fixer
- id: check-yaml
args: ["--unsafe"] # Allow custom YAML tags
exclude: ^helm/
- id: check-toml
- id: check-json
- id: check-added-large-files
args: ["--maxkb=500"]
- id: check-merge-conflict
- id: check-case-conflict
- id: debug-statements
- id: check-docstring-first
- id: detect-private-key
- id: detect-aws-credentials
args: ["--allow-missing-credentials"]
- repo: https://github.com/PyCQA/bandit
rev: 1.7.9
hooks:
- id: bandit
pass_filenames: false
args: ["--exit-zero", "-r", "simplenote_mcp", "-f", "json"]
exclude: "tests/"
additional_dependencies: []
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.12.0
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
# Allow E402 (module level import not at top) for specific import patterns needed for Python 3.13+ compatibility
exclude: |
(?x)^(
simplenote_mcp_server\.py|
run_server\.py|
run_test_workflow\.py|
simplenote_mcp/scripts/.*\.py|
simplenote_mcp/tests/.*\.py
)$
- id: ruff-format
args: ["--line-length=88"]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.16.1
hooks:
- id: mypy
args: [--config-file=mypy.ini, simplenote_mcp]
pass_filenames: false
always_run: true
additional_dependencies: []