-
Notifications
You must be signed in to change notification settings - Fork 656
/
.pre-commit-config.yaml
112 lines (112 loc) · 3.24 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
---
ci:
skip:
# https://github.com/pre-commit-ci/issues/issues/55
- pip-compile
default_language_version:
python: python3.8
repos:
- repo: https://github.com/pre-commit/mirrors-prettier
# keep it before yamllint
rev: "v2.7.1"
hooks:
- id: prettier
# Temporary excludes so we can gradually normalize the formatting
exclude: >
(?x)^(
src/molecule/cookiecutter/.*|
src/molecule/test/resources/templates/.*
)$
additional_dependencies:
- prettier
- prettier-plugin-toml
- repo: https://github.com/PyCQA/doc8
rev: "0.11.2"
hooks:
- id: doc8
- repo: https://github.com/codespell-project/codespell
rev: v2.1.0
hooks:
- id: codespell
- repo: https://github.com/PyCQA/isort
rev: 5.10.1
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 22.6.0
hooks:
- id: black
language_version: python3
- repo: https://github.com/pre-commit/pre-commit-hooks.git
rev: v4.3.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: 4.0.1
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.27.1
hooks:
- id: yamllint
files: \.(yaml|yml)$
types: [file, yaml]
entry: yamllint --strict
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.961
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.1.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.14.4
hooks:
- id: pylint
additional_dependencies:
- ansible-compat>=2.1.0
- cerberus
- click
- click-help-colors
- cookiecutter
- enrich>=1.2.7
- filelock
- pexpect
- testinfra
- repo: https://github.com/jazzband/pip-tools
rev: 6.8.0
hooks:
- id: pip-compile
entry: pip-compile -q --strip-extras --no-annotate --output-file=requirements.txt tools/opts.txt setup.cfg --extra docs --extra test --extra yamllint
- id: pip-compile
name: pip-compile-upgrade
entry: pip-compile -q --strip-extras -q --upgrade --no-annotate --output-file=requirements.txt tools/opts.txt setup.cfg --extra docs --extra test --extra yamllint
files: ^(setup\.cfg|requirements.txt|constraints\.txt)$
stages: [manual]