15
15
from utils import colored , get_mypy_req , make_venv , print_error , print_success_msg
16
16
17
17
18
- def run_stubtest (dist : Path , * , verbose : bool = False , specified_stubs_only : bool = False ) -> bool :
18
+ def run_stubtest (dist : Path , * , verbose : bool = False , specified_platforms_only : bool = False ) -> bool :
19
19
dist_name = dist .name
20
20
metadata = read_metadata (dist_name )
21
21
print (f"{ dist_name } ... " , end = "" )
@@ -26,7 +26,7 @@ def run_stubtest(dist: Path, *, verbose: bool = False, specified_stubs_only: boo
26
26
return True
27
27
28
28
if sys .platform not in stubtest_settings .platforms :
29
- if specified_stubs_only :
29
+ if specified_platforms_only :
30
30
print (colored ("skipping (platform not specified in METADATA.toml)" , "yellow" ))
31
31
return True
32
32
print (colored (f"Note: { dist_name } is not currently tested on { sys .platform } in typeshed's CI." , "yellow" ))
@@ -154,7 +154,7 @@ def main() -> NoReturn:
154
154
parser .add_argument ("--num-shards" , type = int , default = 1 )
155
155
parser .add_argument ("--shard-index" , type = int , default = 0 )
156
156
parser .add_argument (
157
- "--specified-stubs -only" ,
157
+ "--specified-platforms -only" ,
158
158
action = "store_true" ,
159
159
help = "skip the test if the current platform is not specified in METADATA.toml/tool.stubtest.platforms" ,
160
160
)
@@ -171,7 +171,7 @@ def main() -> NoReturn:
171
171
for i , dist in enumerate (dists ):
172
172
if i % args .num_shards != args .shard_index :
173
173
continue
174
- if not run_stubtest (dist , verbose = args .verbose , specified_stubs_only = args .specified_stubs_only ):
174
+ if not run_stubtest (dist , verbose = args .verbose , specified_platforms_only = args .specified_platforms_only ):
175
175
result = 1
176
176
sys .exit (result )
177
177
0 commit comments