forked from ansible/molecule
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
127 lines (127 loc) · 3.75 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
121
122
123
124
125
126
127
---
ci:
skip:
# https://github.com/pre-commit-ci/issues/issues/55
- pip-compile
- schema
default_language_version:
python: python3.9
repos:
- repo: local
hooks:
- id: schema
name: schema
entry: bash -c "cd tools/test-schema && npm install && npm test"
pass_filenames: false
always_run: true
language: node
- repo: https://github.com/pre-commit/mirrors-prettier
# keep it before yamllint
rev: "v3.0.0-alpha.4"
hooks:
- id: prettier
# Temporary excludes so we can gradually normalize the formatting
exclude: >
(?x)^(
src/molecule/cookiecutter/.*|
src/molecule/test/resources/templates/.*|
tools/test-schema/(negative_test|test)/.*|
)$
additional_dependencies:
- prettier
- prettier-plugin-toml
- repo: https://github.com/PyCQA/doc8
rev: "v1.0.0"
hooks:
- id: doc8
- repo: https://github.com/codespell-project/codespell
rev: v2.2.2
hooks:
- id: codespell
exclude: >
(?x)^(
tools/test-schema/package-lock.json
)$
- repo: https://github.com/PyCQA/isort
rev: 5.10.1
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 22.10.0
hooks:
- id: black
language_version: python3
- repo: https://github.com/pre-commit/pre-commit-hooks.git
rev: v4.4.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
rev: 6.0.0
hooks:
- id: flake8
additional_dependencies:
- pydocstyle>=5.1.1
- flake8-absolute-import
- flake8-black>=0.1.1
- flake8-docstrings>=1.5.0
language_version: python3
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.28.0
hooks:
- id: yamllint
files: \.(yaml|yml)$
types: [file, yaml]
entry: yamllint --strict
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.991
hooks:
- id: mypy
# empty args needed in order to match mypy cli behavior
args: []
entry: mypy src/
pass_filenames: false
additional_dependencies:
- ansible-compat>=2.2.0
- click>=8.0.1
- enrich>=1.2.7
- importlib-metadata>=4.6.1
- jinja2
- packaging
- rich
- ruamel.yaml>=0.17.10
- types-PyYAML
- types-dataclasses
- types-filelock
- types-setuptools
- repo: https://github.com/PyCQA/pylint
rev: v2.15.6
hooks:
- id: pylint
additional_dependencies:
- ansible-compat>=2.2.0
- click
- click-help-colors
- cookiecutter
- enrich>=1.2.7
- filelock
- jsonschema
- pexpect
- testinfra
- repo: https://github.com/jazzband/pip-tools
rev: 6.10.0
hooks:
- id: pip-compile
entry: pip-compile -q --resolver=backtracking --strip-extras --no-annotate --output-file=requirements.txt tools/opts.txt pyproject.toml --extra docs --extra test --extra lint
files: ^(pyproject\.toml|requirements.txt|constraints\.txt)$
- id: pip-compile
name: pip-compile-upgrade
entry: pip-compile -q --resolver=backtracking --strip-extras -q --upgrade --no-annotate --output-file=requirements.txt tools/opts.txt pyproject.toml --extra docs --extra test --extra lint
files: ^(pyproject\.toml|requirements.txt|constraints\.txt)$
stages: [manual]