9
9
here = pathlib .Path (__file__ ).parent
10
10
11
11
12
- def run_with_mypy (* args : str , old : bool ) -> None :
12
+ def run (* args : str , old : bool ) -> None :
13
13
if old :
14
14
withs = [
15
15
"--with" ,
@@ -55,7 +55,7 @@ def docs(args: list[str], old: bool) -> None:
55
55
(build_path / "html" ).mkdir (exist_ok = True , parents = True )
56
56
(build_path / "doctrees" ).mkdir (exist_ok = True , parents = True )
57
57
58
- run_with_mypy (
58
+ run (
59
59
"--package" ,
60
60
"tools" ,
61
61
"--extra" ,
@@ -131,13 +131,11 @@ def types(args: list[str], old: bool) -> None:
131
131
os .chdir (example_root )
132
132
locations = [str (path ) for path in paths ]
133
133
134
- run_with_mypy (
135
- "python" , "-m" , "mypy" , * locations , * args , "--enable-incomplete-feature=Unpack" , old = old
136
- )
134
+ run ("python" , "-m" , "mypy" , * locations , * args , "--enable-incomplete-feature=Unpack" , old = old )
137
135
138
136
if not specified :
139
137
os .chdir (here .parent / "example" )
140
- run_with_mypy ("python" , "-m" , "mypy" , "." , * args , old = old )
138
+ run ("python" , "-m" , "mypy" , "." , * args , old = old )
141
139
142
140
143
141
@cli .command (context_settings = dict (ignore_unknown_options = True ))
@@ -147,7 +145,7 @@ def tests(args: list[str], old: bool) -> None:
147
145
"""
148
146
Run pytest
149
147
"""
150
- run_with_mypy ("python" , "-m" , "pytest" , * args , old = old )
148
+ run ("python" , "-m" , "pytest" , * args , old = old )
151
149
152
150
153
151
if __name__ == "__main__" :
0 commit comments