2025-02-05 11:32:35 +01:00
|
|
|
---
|
|
|
|
# See https://pre-commit.com for more information
|
|
|
|
# See https://pre-commit.com/hooks.html for more hooks
|
2025-02-05 11:54:55 +01:00
|
|
|
ci:
|
|
|
|
autoupdate_commit_msg: "ci: pre-commit autoupdate"
|
|
|
|
|
2025-02-05 11:39:50 +01:00
|
|
|
files: ^(anta|docs|scripts|tests|asynceapi)/
|
2025-02-05 11:32:35 +01:00
|
|
|
|
|
|
|
repos:
|
|
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
2025-02-05 11:54:55 +01:00
|
|
|
rev: v5.0.0
|
2025-02-05 11:32:35 +01:00
|
|
|
hooks:
|
|
|
|
- id: trailing-whitespace
|
2025-02-05 11:39:50 +01:00
|
|
|
exclude: docs/.*.svg
|
2025-02-05 11:32:35 +01:00
|
|
|
- id: end-of-file-fixer
|
|
|
|
- id: check-added-large-files
|
2025-02-05 11:39:50 +01:00
|
|
|
exclude: tests/data/.*$
|
2025-02-05 11:32:35 +01:00
|
|
|
- id: check-merge-conflict
|
|
|
|
|
|
|
|
- repo: https://github.com/Lucas-C/pre-commit-hooks
|
2025-02-05 11:54:06 +01:00
|
|
|
rev: v1.5.5
|
2025-02-05 11:32:35 +01:00
|
|
|
hooks:
|
|
|
|
- name: Check and insert license on Python files
|
|
|
|
id: insert-license
|
|
|
|
# exclude:
|
|
|
|
files: .*\.py$
|
|
|
|
args:
|
|
|
|
- --license-filepath
|
|
|
|
- .github/license-short.txt
|
|
|
|
- --use-current-year
|
|
|
|
- --allow-past-years
|
|
|
|
- --fuzzy-match-generates-todo
|
|
|
|
- --no-extra-eol
|
|
|
|
|
|
|
|
- name: Check and insert license on Markdown files
|
|
|
|
id: insert-license
|
|
|
|
files: .*\.md$
|
2025-02-05 11:54:55 +01:00
|
|
|
exclude: ^tests/data/.*\.md$
|
2025-02-05 11:32:35 +01:00
|
|
|
args:
|
|
|
|
- --license-filepath
|
|
|
|
- .github/license-short.txt
|
|
|
|
- --use-current-year
|
|
|
|
- --allow-past-years
|
|
|
|
- --fuzzy-match-generates-todo
|
|
|
|
- --comment-style
|
|
|
|
- '<!--| ~| -->'
|
|
|
|
|
2025-02-05 11:39:09 +01:00
|
|
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
2025-02-05 11:54:55 +01:00
|
|
|
rev: v0.6.9
|
2025-02-05 11:32:35 +01:00
|
|
|
hooks:
|
2025-02-05 11:39:09 +01:00
|
|
|
- id: ruff
|
|
|
|
name: Run Ruff linter
|
|
|
|
args: [ --fix ]
|
|
|
|
- id: ruff-format
|
|
|
|
name: Run Ruff formatter
|
2025-02-05 11:32:35 +01:00
|
|
|
|
2025-02-05 11:54:06 +01:00
|
|
|
- repo: https://github.com/pycqa/pylint
|
2025-02-05 11:54:55 +01:00
|
|
|
rev: "v3.3.1"
|
2025-02-05 11:32:35 +01:00
|
|
|
hooks:
|
|
|
|
- id: pylint
|
2025-02-05 11:39:09 +01:00
|
|
|
name: Check code style with pylint
|
2025-02-05 11:32:35 +01:00
|
|
|
description: This hook runs pylint.
|
|
|
|
types: [python]
|
|
|
|
args:
|
2025-02-05 11:39:09 +01:00
|
|
|
- -rn # Only display messages
|
|
|
|
- -sn # Don't display the score
|
|
|
|
- --rcfile=pyproject.toml # Link to config file
|
2025-02-05 11:54:06 +01:00
|
|
|
additional_dependencies:
|
|
|
|
- anta[cli]
|
|
|
|
- types-PyYAML
|
|
|
|
- types-requests
|
|
|
|
- types-pyOpenSSL
|
|
|
|
- pylint_pydantic
|
|
|
|
- pytest
|
2025-02-05 11:54:55 +01:00
|
|
|
- pytest-codspeed
|
|
|
|
- respx
|
2025-02-05 11:32:35 +01:00
|
|
|
|
2025-02-05 11:39:09 +01:00
|
|
|
- repo: https://github.com/codespell-project/codespell
|
2025-02-05 11:54:06 +01:00
|
|
|
rev: v2.3.0
|
2025-02-05 11:39:09 +01:00
|
|
|
hooks:
|
|
|
|
- id: codespell
|
|
|
|
name: Checks for common misspellings in text files.
|
|
|
|
entry: codespell
|
|
|
|
language: python
|
|
|
|
types: [text]
|
2025-02-05 11:32:35 +01:00
|
|
|
|
|
|
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
2025-02-05 11:54:55 +01:00
|
|
|
rev: v1.11.2
|
2025-02-05 11:32:35 +01:00
|
|
|
hooks:
|
|
|
|
- id: mypy
|
2025-02-05 11:39:09 +01:00
|
|
|
name: Check typing with mypy
|
2025-02-05 11:32:35 +01:00
|
|
|
args:
|
|
|
|
- --config-file=pyproject.toml
|
|
|
|
additional_dependencies:
|
2025-02-05 11:39:50 +01:00
|
|
|
- anta[cli]
|
2025-02-05 11:32:35 +01:00
|
|
|
- types-PyYAML
|
|
|
|
- types-requests
|
2025-02-05 11:39:50 +01:00
|
|
|
- types-pyOpenSSL
|
|
|
|
- pytest
|
2025-02-05 11:32:35 +01:00
|
|
|
files: ^(anta|tests)/
|
2025-02-05 11:54:55 +01:00
|
|
|
|
|
|
|
- repo: https://github.com/igorshubovych/markdownlint-cli
|
|
|
|
rev: v0.42.0
|
|
|
|
hooks:
|
|
|
|
- id: markdownlint
|
|
|
|
name: Check Markdown files style.
|
|
|
|
args:
|
|
|
|
- --config=.github/markdownlint.yaml
|
|
|
|
- --ignore-path=.github/markdownlintignore
|
|
|
|
- --fix
|