-
Notifications
You must be signed in to change notification settings - Fork 655
/
.pre-commit-config.yaml
116 lines (115 loc) · 3.58 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
---
ci:
skip:
# https://github.com/pre-commit-ci/issues/issues/55
- pip-compile
default_language_version:
python: python3.9
repos:
- repo: https://github.com/pre-commit/mirrors-prettier
# keep it before yamllint
rev: "v3.0.0-alpha.9-for-vscode"
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/codespell-project/codespell
rev: v2.2.5
hooks:
- id: codespell
- repo: https://github.com/psf/black
rev: 23.3.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/adrienverge/yamllint.git
rev: v1.32.0
hooks:
- id: yamllint
files: \.(yaml|yml)$
types: [file, yaml]
entry: yamllint --strict
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.0.275"
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.4.0
hooks:
- id: mypy
# empty args needed in order to match mypy cli behavior
args: []
entry: mypy src/
pass_filenames: false
additional_dependencies:
- ansible-compat>=4.1.2
- 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: v3.0.0a6
hooks:
- id: pylint
args:
- --output-format=colorized
additional_dependencies:
- ansible-compat>=4.1.2
- click
- click-help-colors
- cookiecutter
- enrich>=1.2.7
- filelock
- jsonschema
- pexpect
- testinfra
- repo: https://github.com/jazzband/pip-tools
rev: 6.13.0
hooks:
- id: pip-compile
entry: pip-compile -q --resolver=backtracking --strip-extras --no-annotate --output-file=.config/requirements.txt pyproject.toml --extra docs --extra test
files: ^(pyproject\.toml|\.config\/.*)$
- id: pip-compile
name: pip-compile-upgrade
alias: up
entry: pip-compile -q --resolver=backtracking --strip-extras -q --upgrade --no-annotate --output-file=.config/requirements.txt pyproject.toml --extra docs --extra test
files: ^(pyproject\.toml|\.config\/.*)$
stages: [manual]
- id: pip-compile
name: lock
alias: lock
always_run: true
entry: pip-compile --upgrade --resolver=backtracking --no-annotate --output-file=.config/requirements-lock.txt pyproject.toml --strip-extras --unsafe-package ruamel-yaml-clib
files: ^.config\/requirements.*$
language: python
language_version: "3.9" # minimal we support officially
pass_filenames: false
stages: [manual]
additional_dependencies:
- pip>=22.3.1