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 11#!/usr/bin/env python3
22
3- import re
43import subprocess
54import sys
65
Original file line number Diff line number Diff line change 11#!/usr/bin/env python3
22
3+ import os .path
34import subprocess
45import sys
56from typing import List
@@ -15,11 +16,22 @@ def run(command: List[str]) -> None:
1516 exitcode = 1
1617
1718
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 ])
2436
2537sys .exit (exitcode )
You can’t perform that action at this time.
0 commit comments