-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
.pre-commit-config.yaml
120 lines (119 loc) · 3.82 KB
/
.pre-commit-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
---
ci:
# format compatible with commitlint
autoupdate_commit_msg: "chore: pre-commit autoupdate"
autoupdate_schedule: monthly
autofix_commit_msg: |
chore: auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
skip:
# https://github.com/pre-commit-ci/issues/issues/55
- pip-compile
repos:
- repo: https://github.com/pre-commit/mirrors-prettier
# keep it before yamllint
rev: v4.0.0-alpha.8
hooks:
- id: prettier
# Temporary excludes so we can gradually normalize the formatting
exclude: >
(?x)^(
docs/_static/.*\.css|
src/sphinx_ansible_theme/.*\.css|
src/sphinx_ansible_theme/.*\.html
)$
additional_dependencies:
- prettier
- prettier-plugin-toml
- repo: https://github.com/psf/black
rev: 24.10.0
hooks:
- id: black
language_version: python3
exclude: |
(?x)(
^docs/conf.py$
)
- repo: https://github.com/pre-commit/pre-commit-hooks.git
rev: v5.0.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: mixed-line-ending
- id: check-byte-order-marker
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: debug-statements
language_version: python3
- repo: https://github.com/pycqa/flake8.git
rev: 7.1.1
hooks:
- id: flake8
additional_dependencies:
- flake8-absolute-import
# - flake8-black>=0.1.1
- flake8-docstrings>=1.5.0
- flake8-mypy
language_version: python3
- repo: https://github.com/pre-commit/mirrors-mypy.git
rev: v1.14.1
hooks:
- id: mypy
alias: mypy-py312
name: MyPy, for Python 3.12
additional_dependencies:
- lxml # requirement of `--txt-report`
- Sphinx >= 3.1.2
- types-setuptools
args:
- --namespace-packages
- --python-version=3.12
- --txt-report=.tox/.tmp/.mypy/python-3.12
- src/sphinx_ansible_theme/
pass_filenames: false
- id: mypy
alias: mypy-py310
name: MyPy, for Python 3.10
additional_dependencies:
- lxml # requirement of `--txt-report`
- Sphinx >= 3.1.2
- types-setuptools
args:
- --namespace-packages
- --python-version=3.10
- --txt-report=.tox/.tmp/.mypy/python-3.10
- src/sphinx_ansible_theme/
pass_filenames: false
- id: mypy
alias: mypy-py38
name: MyPy, for Python 3.8
additional_dependencies:
- lxml # requirement of `--txt-report`
- Sphinx >= 3.1.2
- types-setuptools
args:
- --namespace-packages
- --python-version=3.8
- --txt-report=.tox/.tmp/.mypy/python-3.8
- src/sphinx_ansible_theme/
pass_filenames: false
- repo: https://github.com/jazzband/pip-tools
rev: 7.4.1
hooks:
- id: pip-compile
entry: pip-compile --resolver=backtracking -q --no-annotate --output-file=requirements.txt --extra docs --extra test --strip-extras pyproject.toml
language: python
files: ^(requirements\.txt|pyproject\.toml)$
alias: deps
language_version: "3.9" # minimal we support officially
additional_dependencies:
- pip>=22.3.1
- id: pip-compile
entry: pip-compile --resolver=backtracking -q --no-annotate --output-file=requirements.txt --extra docs --extra test --strip-extras pyproject.toml --upgrade
language: python
files: ^(requirements\.txt|pyproject\.toml)$
alias: up
stages: [manual]
language_version: "3.9" # minimal we support officially
additional_dependencies:
- pip>=22.3.1