2023-03-17 15:15:55 +08:00
|
|
|
# Install pre-commit hooks via
|
|
|
|
# pre-commit install
|
|
|
|
|
|
|
|
exclude: >
|
|
|
|
(?x)^(
|
|
|
|
\.vscode/settings\.json|
|
|
|
|
test.*\.md|
|
|
|
|
test.*\.txt|
|
|
|
|
test.*\.html|
|
|
|
|
test.*\.xml|
|
|
|
|
.*commonmark\.json|
|
|
|
|
benchmark/.*\.md|
|
|
|
|
.*/spec\.md
|
|
|
|
)$
|
|
|
|
|
|
|
|
repos:
|
|
|
|
|
|
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
2024-05-07 15:43:08 +08:00
|
|
|
rev: v4.4.0
|
2023-03-17 15:15:55 +08:00
|
|
|
hooks:
|
|
|
|
- id: check-json
|
|
|
|
- id: check-yaml
|
|
|
|
- id: end-of-file-fixer
|
|
|
|
- id: trailing-whitespace
|
|
|
|
|
|
|
|
- repo: https://github.com/pycqa/isort
|
2024-05-07 15:43:08 +08:00
|
|
|
rev: 5.12.0
|
2023-03-17 15:15:55 +08:00
|
|
|
hooks:
|
|
|
|
- id: isort
|
|
|
|
|
|
|
|
- repo: https://github.com/psf/black
|
2024-05-07 15:43:08 +08:00
|
|
|
rev: 23.3.0
|
2023-03-17 15:15:55 +08:00
|
|
|
hooks:
|
|
|
|
- id: black
|
|
|
|
|
2024-05-07 15:43:08 +08:00
|
|
|
- repo: https://github.com/charliermarsh/ruff-pre-commit
|
|
|
|
rev: v0.0.270
|
2023-03-17 15:15:55 +08:00
|
|
|
hooks:
|
2024-05-07 15:43:08 +08:00
|
|
|
- id: ruff
|
2023-03-17 15:15:55 +08:00
|
|
|
|
|
|
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
2024-05-07 15:43:08 +08:00
|
|
|
rev: v1.3.0
|
2023-03-17 15:15:55 +08:00
|
|
|
hooks:
|
|
|
|
- id: mypy
|
2024-05-07 15:43:08 +08:00
|
|
|
additional_dependencies: [mdurl]
|
|
|
|
exclude: >
|
|
|
|
(?x)^(
|
|
|
|
benchmarking/.*\.py|
|
|
|
|
docs/.*\.py|
|
|
|
|
scripts/.*\.py|
|
|
|
|
)$
|