File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change 1111root = Path (__file__ ).parent .parent
1212stubs_path = root / "stubs"
1313PARTIAL_STUBS_MARKER = "-stubs"
14+ SKIP_PACKAGES = {
15+ # This stub has been upstreamed and is only kept for backwards compatibility
16+ # The version that is stubbed does not match the one we install for type testing
17+ "matplotlib" ,
18+ }
1419
1520
1621def run_stubtest (module : str ) -> CompletedProcess [bytes ]:
@@ -40,16 +45,12 @@ def run_stubtest(module: str) -> CompletedProcess[bytes]:
4045 return run ((sys .executable , "-m" , * args ), cwd = stubs_path )
4146
4247
43- def main (modules : Collection [str ]) -> int :
48+ def main (packages : Collection [str ]) -> int :
4449 returncode = 0
45- if not modules :
46- modules = os .listdir (stubs_path )
47- for stub_module in modules :
48- if stub_module in {
49- # This stub has been upstreamed and is only kept for backwards compatibility
50- # The version that is stubbed does not match the one we install for type testing
51- "matplotlib" ,
52- }:
50+ if not packages :
51+ packages = os .listdir (stubs_path )
52+ for stub_module in packages :
53+ if stub_module in SKIP_PACKAGES :
5354 print (f"\n Skipped { stub_module } " , flush = True )
5455 continue
5556 if stub_module .startswith ("." ):
You can’t perform that action at this time.
0 commit comments