File tree Expand file tree Collapse file tree 2 files changed +18
-7
lines changed Expand file tree Collapse file tree 2 files changed +18
-7
lines changed Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env python3
2
2
3
- import re
4
3
import subprocess
5
4
import sys
6
5
Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env python3
2
2
3
+ import os .path
3
4
import subprocess
4
5
import sys
5
6
from typing import List
@@ -15,11 +16,22 @@ def run(command: List[str]) -> None:
15
16
exitcode = 1
16
17
17
18
18
- run (["flake8" , "." ])
19
- run ([
20
- "mypy" ,
21
- "--strict" ,
22
- "--ignore-missing-imports" ,
23
- "." ])
19
+ extra_files = [
20
+ os .path .join ('hooks' , 'pre-commit' ),
21
+ os .path .join ('hooks' , 'pre-push' )
22
+ ]
23
+
24
+ run (["flake8" , "." ] + extra_files )
25
+
26
+ mypy_cmd = [
27
+ "mypy" ,
28
+ "--strict" ,
29
+ "--ignore-missing-imports"
30
+ ]
31
+
32
+ run (mypy_cmd + ['.' ])
33
+
34
+ for extra_file in extra_files :
35
+ run (mypy_cmd + [extra_file ])
24
36
25
37
sys .exit (exitcode )
You can’t perform that action at this time.
0 commit comments