Commit 8836376
authored
Switch mypy prek hooks to be executed on pre-push, not on pre-commit (apache#56829)
The MyPy checks are slow and they require breeze image to be built,
so they are slowing down commit operations when you have prek
installed and your image is not built or your change contains
a number of files and mypy cache is not warmed up.
Moving mypy checks to pre-push makes it easier to accept by
developers to run `prek install` - and they might also opt-in to
use `prek install --hook-type pre-push` if they want to (by default)
run mypy checks when pushing their changes.
Still - even if you install prek with hook-stage `pre-push` you can
skip it by `git push --no-verify` - same as in case of commit.
This should make "prek" experience quite a bit better for casual usage
or when people are not keeping their breeze image updated.
This should also help in case of cherry-picking, when cherry-picking,
and you need to resolve conflicts, git does not have option to run
`cherry-pick --continue --no-verify` and you need to manually
uninstall prek to skip running prek hooks - which often is slow
due to image not being fresh enough and mypy being generally slow.
This might be quite a QOL improvement for many contributors1 parent 8cd988d commit 8836376
File tree
5 files changed
+47
-63
lines changed- contributing-docs
- dev/breeze
- src/airflow_breeze/utils
- tests
5 files changed
+47
-63
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1349 | 1349 | | |
1350 | 1350 | | |
1351 | 1351 | | |
| 1352 | + | |
1352 | 1353 | | |
1353 | 1354 | | |
1354 | 1355 | | |
| |||
1363 | 1364 | | |
1364 | 1365 | | |
1365 | 1366 | | |
| 1367 | + | |
1366 | 1368 | | |
1367 | 1369 | | |
1368 | 1370 | | |
| |||
1377 | 1379 | | |
1378 | 1380 | | |
1379 | 1381 | | |
| 1382 | + | |
1380 | 1383 | | |
1381 | 1384 | | |
1382 | 1385 | | |
| |||
1391 | 1394 | | |
1392 | 1395 | | |
1393 | 1396 | | |
| 1397 | + | |
1394 | 1398 | | |
1395 | 1399 | | |
1396 | 1400 | | |
| |||
1405 | 1409 | | |
1406 | 1410 | | |
1407 | 1411 | | |
| 1412 | + | |
1408 | 1413 | | |
1409 | 1414 | | |
1410 | 1415 | | |
| |||
1419 | 1424 | | |
1420 | 1425 | | |
1421 | 1426 | | |
| 1427 | + | |
1422 | 1428 | | |
1423 | 1429 | | |
1424 | 1430 | | |
| |||
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
54 | 56 | | |
55 | 57 | | |
56 | 58 | | |
| |||
151 | 153 | | |
152 | 154 | | |
153 | 155 | | |
154 | | - | |
| 156 | + | |
| 157 | + | |
155 | 158 | | |
156 | 159 | | |
157 | 160 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
| 119 | + | |
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | | - | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
161 | 166 | | |
162 | 167 | | |
163 | 168 | | |
| |||
170 | 175 | | |
171 | 176 | | |
172 | 177 | | |
173 | | - | |
| 178 | + | |
174 | 179 | | |
175 | 180 | | |
176 | 181 | | |
177 | 182 | | |
178 | 183 | | |
179 | | - | |
| 184 | + | |
180 | 185 | | |
181 | | - | |
| 186 | + | |
182 | 187 | | |
183 | 188 | | |
184 | 189 | | |
185 | 190 | | |
186 | 191 | | |
187 | | - | |
| 192 | + | |
| 193 | + | |
188 | 194 | | |
189 | 195 | | |
190 | 196 | | |
191 | 197 | | |
192 | 198 | | |
193 | | - | |
| 199 | + | |
| 200 | + | |
194 | 201 | | |
195 | 202 | | |
196 | 203 | | |
197 | 204 | | |
198 | 205 | | |
199 | | - | |
| 206 | + | |
| 207 | + | |
200 | 208 | | |
201 | 209 | | |
202 | 210 | | |
| |||
207 | 215 | | |
208 | 216 | | |
209 | 217 | | |
210 | | - | |
| 218 | + | |
211 | 219 | | |
212 | 220 | | |
213 | 221 | | |
| |||
262 | 270 | | |
263 | 271 | | |
264 | 272 | | |
265 | | - | |
266 | | - | |
267 | | - | |
| 273 | + | |
| 274 | + | |
268 | 275 | | |
269 | 276 | | |
270 | 277 | | |
| |||
288 | 295 | | |
289 | 296 | | |
290 | 297 | | |
291 | | - | |
| 298 | + | |
292 | 299 | | |
293 | 300 | | |
294 | 301 | | |
295 | | - | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
296 | 305 | | |
297 | 306 | | |
298 | 307 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1215 | 1215 | | |
1216 | 1216 | | |
1217 | 1217 | | |
1218 | | - | |
1219 | | - | |
1220 | | - | |
1221 | | - | |
1222 | | - | |
1223 | | - | |
1224 | | - | |
1225 | | - | |
1226 | | - | |
1227 | | - | |
1228 | | - | |
1229 | | - | |
1230 | | - | |
1231 | | - | |
1232 | | - | |
1233 | | - | |
1234 | | - | |
1235 | 1218 | | |
1236 | 1219 | | |
1237 | 1220 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
109 | | - | |
| 108 | + | |
110 | 109 | | |
111 | 110 | | |
112 | 111 | | |
113 | | - | |
114 | | - | |
115 | | - | |
| 112 | + | |
116 | 113 | | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
| 114 | + | |
| 115 | + | |
125 | 116 | | |
126 | 117 | | |
127 | | - | |
128 | | - | |
| 118 | + | |
129 | 119 | | |
130 | 120 | | |
131 | 121 | | |
132 | | - | |
133 | | - | |
134 | | - | |
| 122 | + | |
135 | 123 | | |
136 | 124 | | |
137 | 125 | | |
138 | | - | |
139 | | - | |
| 126 | + | |
140 | 127 | | |
141 | 128 | | |
142 | 129 | | |
143 | 130 | | |
144 | 131 | | |
145 | | - | |
146 | | - | |
| 132 | + | |
147 | 133 | | |
148 | 134 | | |
149 | 135 | | |
150 | 136 | | |
151 | | - | |
152 | | - | |
| 137 | + | |
153 | 138 | | |
154 | 139 | | |
155 | 140 | | |
156 | | - | |
157 | | - | |
| 141 | + | |
158 | 142 | | |
159 | 143 | | |
160 | 144 | | |
| |||
163 | 147 | | |
164 | 148 | | |
165 | 149 | | |
166 | | - | |
167 | | - | |
| 150 | + | |
168 | 151 | | |
169 | 152 | | |
170 | 153 | | |
| |||
1112 | 1095 | | |
1113 | 1096 | | |
1114 | 1097 | | |
1115 | | - | |
| 1098 | + | |
1116 | 1099 | | |
1117 | 1100 | | |
1118 | 1101 | | |
| |||
0 commit comments