4545
4646# Dockerfile linter
4747- repo : https://github.com/hadolint/hadolint
48- rev : v2.12 .1-beta
48+ rev : v2.13 .1-beta
4949 hooks :
5050 - id : hadolint
5151 args : [
@@ -61,8 +61,89 @@ repos:
6161
6262# JSON5 Linter
6363- repo : https://github.com/pre-commit/mirrors-prettier
64- rev : v3.1.0
64+ rev : v4.0.0-alpha.8
6565 hooks :
6666 - id : prettier
6767 # https://prettier.io/docs/en/options.html#parser
6868 files : ' .json5$'
69+
70+
71+ # #########
72+ # PYTHON #
73+ # #########
74+
75+ - repo : https://github.com/astral-sh/ruff-pre-commit
76+ rev : v0.8.4
77+ hooks :
78+ - id : ruff
79+ args : [--fix]
80+ types_or : [python, pyi]
81+ - id : ruff-format
82+ types_or : [python, pyi]
83+ args : [--config, format.quote-style = 'single', --config, line-length = 100]
84+
85+ - repo : https://github.com/pycqa/isort
86+ rev : 5.13.2
87+ hooks :
88+ - id : isort
89+ name : isort
90+ args : [--force-single-line, --profile=black]
91+
92+ - repo : https://github.com/asottile/add-trailing-comma
93+ rev : v3.1.0
94+ hooks :
95+ - id : add-trailing-comma
96+
97+ - repo : https://github.com/pre-commit/mirrors-autopep8
98+ rev : v2.0.4
99+ hooks :
100+ - id : autopep8
101+ args :
102+ - -i
103+ - --max-line-length=100
104+
105+ # Usage: http://pylint.pycqa.org/en/latest/user_guide/message-control.html
106+ - repo : https://github.com/PyCQA/pylint
107+ rev : v3.3.3
108+ hooks :
109+ - id : pylint
110+ args :
111+ - --disable=import-error # E0401. Locally you could not have all imports.
112+ - --disable=fixme # W0511. 'TODO' notations.
113+ - --disable=logging-fstring-interpolation # Conflict with "use a single formatting" WPS323
114+ - --disable=ungrouped-imports # ignore `if TYPE_CHECKING` case. Other do reorder-python-imports
115+ - --disable=R0801 # Similar lines in 2 files. Currently I don't think that it possible to DRY hooks unique files boilerplate
116+
117+ - repo : https://github.com/pre-commit/mirrors-mypy
118+ rev : v1.14.1
119+ hooks :
120+ - id : mypy
121+ additional_dependencies :
122+ - types-PyYAML
123+ args : [
124+ --ignore-missing-imports,
125+ --disallow-untyped-calls,
126+ --warn-redundant-casts,
127+ ]
128+
129+ - repo : https://github.com/wemake-services/wemake-python-styleguide
130+ rev : 1.0.0
131+ hooks :
132+ - id : wemake-python-styleguide
133+ args :
134+ - --allowed-module-metadata=__all__ # Default to ''
135+ - --max-local-variables=6 # Default to 5
136+ - --max-returns=6 # Default to 5
137+ - --max-imports=15 # Default to 12
138+ # https://wemake-python-stylegui.de/en/latest/pages/usage/violations/index.html
139+ - --extend-ignore=
140+ E501 <!-- line too long (> 79 characters). Use 100 -->
141+ WPS115 <!-- Found upper-case constant in a class. All occurrences are false positive -->
142+ WPS226 <!-- Found string literal over-use - append > 3 -->
143+
144+
145+ exclude : |
146+ (?x)
147+ # Ignore deprecated hook
148+ (^src/pre_commit_terraform/terraform_docs_replace.py$
149+ )
0 commit comments