summaryrefslogtreecommitdiffstats
path: root/.pre-commit-config.yaml
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-03-28 06:11:39 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-03-28 06:11:39 +0000
commit1fd6a618b60d7168fd8f37585d5d39d22d775afd (patch)
treefbc6d0c213b8acdd0a31deafe5c5fc0d05a3a312 /.pre-commit-config.yaml
parentInitial commit. (diff)
downloadanta-1fd6a618b60d7168fd8f37585d5d39d22d775afd.tar.xz
anta-1fd6a618b60d7168fd8f37585d5d39d22d775afd.zip
Adding upstream version 0.13.0.upstream/0.13.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '.pre-commit-config.yaml')
-rw-r--r--.pre-commit-config.yaml105
1 files changed, 105 insertions, 0 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
new file mode 100644
index 0000000..d2a26a4
--- /dev/null
+++ b/.pre-commit-config.yaml
@@ -0,0 +1,105 @@
+---
+# See https://pre-commit.com for more information
+# See https://pre-commit.com/hooks.html for more hooks
+files: ^(anta|docs|scripts|tests)/
+
+repos:
+ - repo: https://github.com/pre-commit/pre-commit-hooks
+ rev: v4.4.0
+ hooks:
+ - id: trailing-whitespace
+ - id: end-of-file-fixer
+ - id: check-added-large-files
+ - id: check-merge-conflict
+
+ - repo: https://github.com/Lucas-C/pre-commit-hooks
+ rev: v1.5.4
+ 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$
+ # exclude:
+ args:
+ - --license-filepath
+ - .github/license-short.txt
+ - --use-current-year
+ - --allow-past-years
+ - --fuzzy-match-generates-todo
+ - --comment-style
+ - '<!--| ~| -->'
+
+ - repo: https://github.com/pycqa/isort
+ rev: 5.13.2
+ hooks:
+ - id: isort
+ name: Check for changes when running isort on all python files
+
+ - repo: https://github.com/psf/black
+ rev: 24.1.1
+ hooks:
+ - id: black
+ name: Check for changes when running Black on all python files
+
+ - repo: https://github.com/pycqa/flake8
+ rev: 7.0.0
+ hooks:
+ - id: flake8
+ name: Check for PEP8 error on Python files
+ args:
+ - --config=/dev/null
+ - --max-line-length=165
+
+ - repo: local # as per https://pylint.pycqa.org/en/latest/user_guide/installation/pre-commit-integration.html
+ hooks:
+ - id: pylint
+ entry: pylint
+ language: python
+ name: Check for Linting error on Python files
+ description: This hook runs pylint.
+ types: [python]
+ args:
+ - -rn # Only display messages
+ - -sn # Don't display the score
+ - --rcfile=pylintrc # Link to config file
+
+ # Prepare to turn on ruff
+ # - repo: https://github.com/astral-sh/ruff-pre-commit
+ # # Ruff version.
+ # rev: v0.0.280
+ # hooks:
+ # - id: ruff
+
+ - repo: https://github.com/pre-commit/mirrors-mypy
+ rev: v1.7.1
+ hooks:
+ - id: mypy
+ args:
+ - --config-file=pyproject.toml
+ additional_dependencies:
+ - "aio-eapi==0.3.0"
+ - "click==8.1.3"
+ - "click-help-colors==0.9.1"
+ - "cvprac~=1.3"
+ - "netaddr==0.8.0"
+ - "pydantic~=2.0"
+ - "PyYAML==6.0"
+ - "requests>=2.27"
+ - "rich~=13.4"
+ - "asyncssh==2.13.1"
+ - "Jinja2==3.1.2"
+ - types-PyYAML
+ - types-paramiko
+ - types-requests
+ files: ^(anta|tests)/