Skip to content

Commit b2e1189

Browse files
committed
Revert "pass all arguments to stubtest as is"
This reverts commit df856cd.
1 parent 9004953 commit b2e1189

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/stubtest_stdlib.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ def run_stubtest(typeshed_dir: Path) -> int:
1818
platform_allowlist = "{}.txt".format(sys.platform)
1919
combined_allowlist = "{}-py{}{}.txt".format(sys.platform, sys.version_info.major, sys.version_info.minor)
2020

21+
ignore_unused_allowlist = "--ignore-unused-allowlist" in sys.argv[1:]
22+
2123
cmd = [
2224
sys.executable,
2325
"-m",
@@ -30,7 +32,8 @@ def run_stubtest(typeshed_dir: Path) -> int:
3032
"--allowlist",
3133
str(allowlist_dir / version_allowlist),
3234
]
33-
cmd += sys.argv[1:]
35+
if ignore_unused_allowlist:
36+
cmd += ["--ignore-unused-allowlist"]
3437
if (allowlist_dir / platform_allowlist).exists():
3538
cmd += ["--allowlist", str(allowlist_dir / platform_allowlist)]
3639
if (allowlist_dir / combined_allowlist).exists():

0 commit comments

Comments
 (0)