1- ---
21ci :
3- # We rely on renovate to update it but there is no way to fully disable it
4- # https://github.com/pre-commit-ci/issues/issues/83
52 autoupdate_schedule : quarterly
63 skip :
7- - renovate-config-validator # container limits
4+ - renovate-config-validator
85default_language_version :
9- # ensures that we get same behavior on CI(s) as on local machines
106 python : python3.11
11- exclude : >
12- (?x)^(
13- _readthedocs|
14- .tox
15- )$
7+ exclude : " (?x)^(\n _readthedocs|\n .tox\n )$\n "
168repos :
179 - repo : https://github.com/renovatebot/pre-commit-hooks
18- rev : 41.113.0
10+ rev : 41.113.6
1911 hooks :
2012 - id : renovate-config-validator
2113 alias : renovate
22- args : [--strict]
14+ args :
15+ - --strict
2316 - repo : https://github.com/rbubley/mirrors-prettier
24- rev : " v3.6.2"
17+ rev : v3.6.2
2518 hooks :
2619 - id : prettier
27- # Original hook implementation is flaky due to *several* bugs described
28- # in https://github.com/prettier/prettier/issues/12364
29- # a) CI=1 needed to avoid incomplete output
30- # b) two executions are needed because --list-different works correctly
31- # only when run with --check as with --write the output will also
32- # include other entries and logging level cannot be used to keep only
33- # modified files listed (any file is listes using the log level, regardless if
34- # is modified or not).
35- # c) We avoid letting pre-commit pass each filename in order to avoid
36- # runing multiple instances in parallel. This also ensures that running
37- # prettier from the command line behaves identically with the pre-commit
38- # one. No real performance downsides.
39- # d) exit with the return code from list-different (0=none, 1=some)
40- # rather than the write (0=successfully rewrote files). pre-commit.ci
41- entry : env CI=1 bash -c "prettier --list-different . || ec=$? && prettier --loglevel=error --write . && exit $ec"
20+ entry :
21+ env CI=1 bash -c "prettier --list-different . || ec=$? && prettier
22+ --loglevel=error --write . && exit $ec"
4223 pass_filenames : false
4324 args : []
4425 additional_dependencies :
4526 - prettier
4627 - prettier-plugin-toml
47-
4828 - repo : https://github.com/pappasam/toml-sort
4929 rev : v0.24.3
5030 hooks :
5131 - id : toml-sort-fix
52-
5332 - repo : https://github.com/tox-dev/tox-ini-fmt
5433 rev : 1.6.0
5534 hooks :
5635 - id : tox-ini-fmt
57-
58- - repo : https://github.com/astral-sh/ruff-pre-commit
59- rev : " v0.13.0"
60- hooks :
61- - id : ruff
62- entry : sh -c 'ruff check --fix --force-exclude && ruff format --force-exclude'
63- types_or : [python, pyi]
64-
6536 - repo : https://github.com/streetsidesoftware/cspell-cli
6637 rev : v9.2.0
6738 hooks :
6839 - id : cspell
6940 name : Spell check with cspell
70-
71- - repo : https://github.com/Lucas-C/pre-commit-hooks.git
72- rev : v1.5.5
73- hooks :
74- - id : remove-tabs
75- exclude : >
76- (?x)^(
77- .config/pylint-baseline.txt
78- )$
79-
8041 - repo : https://github.com/pre-commit/pre-commit-hooks.git
8142 rev : v6.0.0
8243 hooks :
83- # Side-effects:
8444 - id : trailing-whitespace
8545 - id : check-merge-conflict
8646 - id : end-of-file-fixer
@@ -90,84 +50,71 @@ repos:
9050 - id : check-case-conflict
9151 - id : check-symlinks
9252 - id : check-yaml
93- exclude : >
94- (?x)^
95- (
96- mkdocs.yml
97- )
98- $
53+ exclude : " (?x)^\n (\n mkdocs.yml\n )\n $\n "
9954 - id : detect-private-key
100- # Heavy checks:
10155 - id : check-ast
10256 - id : debug-statements
103-
10457 - repo : https://gitlab.com/bmares/check-json5
105- # Allow json comments, trailing commas
106- # https://github.com/pre-commit/pre-commit-hooks/issues/395
10758 rev : v1.0.0
10859 hooks :
10960 - id : check-json5
110-
11161 - repo : https://github.com/igorshubovych/markdownlint-cli
11262 rev : v0.45.0
11363 hooks :
11464 - id : markdownlint
115- exclude : >
116- (?x)^
117- (
118- \.github/ISSUE_TEMPLATE/\w+|
119- docs/(
120- faq|
121- index|
122- )|
123- README|
124- src/ansible_navigator/data/(help|welcome)
125- )\.md
126- $
127-
65+ exclude :
66+ " (?x)^\n (\n \\ .github/ISSUE_TEMPLATE/\\ w+|\n docs/(\n faq|\n
67+ \ index|\n )|\n README|\n src/ansible_navigator/data/(help|welcome)\n
68+ \ )\\ .md\n $\n "
12869 - repo : https://github.com/codespell-project/codespell
12970 rev : v2.4.1
13071 hooks :
13172 - id : codespell
132- # NOTE: dout is part of the stdout action regex
133- args : ["-L", "dout"]
134- # We exclude generated and external files as they are not directly under
135- # our control, so we cannot fix spelling in them.
136- exclude : >
137- (?x)^
138- (
139- tests/fixtures/integration/actions/.*\.json|
140- src/ansible_navigator/data/grammar/.*\.json
141- )
142- $
143-
73+ args :
74+ - -L
75+ - dout
76+ exclude :
77+ " (?x)^\n (\n tests/fixtures/integration/actions/.*\\ .json|\n
78+ \ src/ansible_navigator/data/grammar/.*\\ .json\n )\n $\n "
14479 - repo : https://github.com/adrienverge/yamllint.git
14580 rev : v1.37.1
14681 hooks :
14782 - id : yamllint
14883 args :
14984 - --strict
150- types : [file, yaml]
151-
85+ types :
86+ - file
87+ - yaml
15288 - repo : https://github.com/PyCQA/flake8.git
15389 rev : 7.3.0
15490 hooks :
15591 - id : flake8
15692 language_version : python3
15793 additional_dependencies :
158- - flake8-docstrings # uses pydocstyle
159-
94+ - flake8-docstrings
16095 - repo : https://github.com/jsh9/pydoclint
16196 rev : 0.7.3
16297 hooks :
16398 - id : pydoclint
164-
16599 - repo : https://github.com/asottile/pyupgrade
166- # keep it after flake8
167100 rev : v3.20.0
168101 hooks :
169102 - id : pyupgrade
170- args : ["--py310-plus"]
103+ args :
104+ - --py310-plus
105+ - repo : https://github.com/pappasam/toml-sort
106+ rev : v0.24.2
107+ hooks :
108+ - id : toml-sort-fix
109+ alias : toml
110+
111+ - repo : https://github.com/astral-sh/ruff-pre-commit
112+ rev : v0.13.0
113+ hooks :
114+ - id : ruff-format
115+ alias : ruff
116+ - id : ruff-check
117+ alias : ruff
171118 - repo : https://github.com/pre-commit/mirrors-mypy.git
172119 rev : v1.18.1
173120 hooks :
@@ -182,9 +129,8 @@ repos:
182129 - types-docutils
183130 - types-mock
184131 - types-PyYAML
185- - types-setuptools # Needed logging version
132+ - types-setuptools
186133 - types-typed-ast
187-
188134 - repo : https://github.com/pycqa/pylint.git
189135 rev : v3.3.8
190136 hooks :
@@ -197,7 +143,7 @@ repos:
197143 - ansible-core
198144 - ansible-runner
199145 - astroid
200- - dill>=0.3.6 # needed for py311
146+ - dill>=0.3.6
201147 - jinja2
202148 - jsonschema
203149 - libtmux
0 commit comments