4
4
skip :
5
5
# pre-commit.ci cannot install WGET, so tomlint must be disabled
6
6
- tomllint
7
- # - pre-commit-update
8
7
9
8
exclude : |
10
9
(?x)^(
@@ -14,12 +13,6 @@ exclude: |
14
13
15
14
repos :
16
15
17
- # - repo: https://gitlab.com/vojko.pribudic/pre-commit-update
18
- # rev: v0.1.0
19
- # hooks:
20
- # - id: pre-commit-update
21
- # args: [--dry-run]
22
-
23
16
- repo : local
24
17
hooks :
25
18
- id : tomllint
52
45
args : ["--fix=lf"]
53
46
- id : name-tests-test
54
47
args : ["--pytest-test-first"]
55
- # Do not allow direct push to main/master branches
56
48
- id : no-commit-to-branch
57
49
# - id: pretty-format-json
58
50
- id : requirements-txt-fixer
@@ -73,18 +65,17 @@ repos:
73
65
- id : markdownlint
74
66
args : ["--fix"]
75
67
76
- # - repo: https://github.com/asottile/pyupgrade
77
- # rev: v3.15.0
78
- # hooks:
79
- # - id: pyupgrade
80
- # args: ['--py37-plus']
81
-
82
68
- repo : https://github.com/psf/black-pre-commit-mirror
83
69
rev : 24.4.2
84
70
hooks :
85
71
- id : black
86
72
- id : black-jupyter
87
73
74
+ # - repo: https://github.com/tomcatling/black-nb
75
+ # rev: '0.7'
76
+ # hooks:
77
+ # - id: black-nb
78
+
88
79
- repo : https://github.com/jorisroovers/gitlint
89
80
rev : v0.19.1
90
81
hooks :
@@ -100,59 +91,34 @@ repos:
100
91
rev : v0.10.0.1
101
92
hooks :
102
93
- id : shellcheck
103
- # Optionally only show errors and warnings
104
- # args: ["--severity=warning"]
105
94
106
- # If you want to avoid flake8 errors due to unused vars or imports:
107
- # - repo: https://github.com/PyCQA/autoflake
108
- # rev: v2.0.0
109
- # hooks:
110
- # - id: autoflake
111
- # args: [
112
- # --in-place,
113
- # --remove-all-unused-imports,
114
- # --remove-unused-variables,
115
- # ]
95
+ - repo : https://github.com/pycqa/pydocstyle.git
96
+ rev : 6.3.0
97
+ hooks :
98
+ - id : pydocstyle
99
+ additional_dependencies : ["tomli"]
116
100
117
101
- repo : https://github.com/PyCQA/isort
118
102
rev : 5.13.2
119
103
hooks :
120
104
- id : isort
121
105
args : ["--profile", "black"]
122
106
123
- - repo : https://github.com/adrienverge/yamllint.git
124
- rev : v1.35.1
125
- hooks :
126
- - id : yamllint
127
- args : [
128
- " -d" ,
129
- " {rules: {line-length: {max: 120}},
130
- ignore-from-file: [.gitignore],
131
- }" ,
132
- ]
133
-
134
107
- repo : https://github.com/Mateusz-Grzelinski/actionlint-py
135
108
rev : v1.6.27.13
136
109
hooks :
137
110
- id : actionlint
138
111
139
- # If like to embrace black styles even in the docs:
140
- # - repo: https://github.com/asottile/blacken-docs
141
- # rev: v1.13.0
142
- # hooks:
143
- # - id: blacken-docs
144
- # additional_dependencies: [black]
145
-
146
112
- repo : https://github.com/pycqa/flake8
147
113
rev : " 7.0.0"
148
114
hooks :
149
115
- id : flake8
150
116
151
- # Check for misspells in documentation files:
152
- # - repo: https://github.com/codespell-project/codespell
153
- # rev: v2.2.2
154
- # hooks:
155
- # - id: codespell
117
+ - repo : https://github.com/adrienverge/yamllint.git
118
+ rev : v1.35.1
119
+ hooks :
120
+ - id : yamllint
121
+ args : [ "-d", "{rules: {line-length: {max: 120}}, ignore-from-file: [.gitignore],}", ]
156
122
157
123
- repo : https://github.com/pre-commit/mirrors-mypy
158
124
rev : " v1.10.0"
@@ -161,3 +127,32 @@ repos:
161
127
verbose : true
162
128
args : [--show-error-codes]
163
129
additional_dependencies : ["pytest", "types-requests"]
130
+
131
+ - repo : https://github.com/astral-sh/ruff-pre-commit
132
+ rev : v0.4.3
133
+ hooks :
134
+ - id : ruff
135
+ files : ^(scripts|tests|custom_components)/.+\.py$
136
+ args : [--fix, --exit-non-zero-on-fix]
137
+ - id : ruff-format
138
+ files : ^(scripts|tests|custom_components)/.+\.py$
139
+
140
+ # Check for misspellings in documentation files
141
+ # - repo: https://github.com/codespell-project/codespell
142
+ # rev: v2.2.2
143
+ # hooks:
144
+ # - id: codespell
145
+
146
+ # To embrace black styles, even in docs
147
+ # - repo: https://github.com/asottile/blacken-docs
148
+ # rev: v1.13.0
149
+ # hooks:
150
+ # - id: blacken-docs
151
+ # additional_dependencies: [black]
152
+
153
+ # Automatically upgrade Python syntax for newer versions
154
+ # - repo: https://github.com/asottile/pyupgrade
155
+ # rev: v3.15.0
156
+ # hooks:
157
+ # - id: pyupgrade
158
+ # args: ['--py37-plus']
0 commit comments