Skip to content

Commit a5fc97e

Browse files
authored
Fix misnamed parameter in stubtest_third_party (#9716)
1 parent 8ff3278 commit a5fc97e

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

.github/workflows/daily.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ jobs:
9595
PYTHON_EXECUTABLE="python"
9696
fi
9797
98-
$PYTHON_EXECUTABLE tests/stubtest_third_party.py --specified-stubs-only --num-shards 4 --shard-index ${{ matrix.shard-index }}
98+
$PYTHON_EXECUTABLE tests/stubtest_third_party.py --specified-platforms-only --num-shards 4 --shard-index ${{ matrix.shard-index }}
9999
stub-uploader:
100100
name: Run the stub_uploader tests
101101
runs-on: ubuntu-latest

.github/workflows/stubtest_third_party.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ jobs:
8585
PYTHON_EXECUTABLE="python"
8686
fi
8787
88-
$PYTHON_EXECUTABLE tests/stubtest_third_party.py --specified-stubs-only $STUBS
88+
$PYTHON_EXECUTABLE tests/stubtest_third_party.py --specified-platforms-only $STUBS
8989
else
9090
echo "Nothing to test"
9191
fi

tests/stubtest_third_party.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from utils import colored, get_mypy_req, make_venv, print_error, print_success_msg
1616

1717

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:
1919
dist_name = dist.name
2020
metadata = read_metadata(dist_name)
2121
print(f"{dist_name}... ", end="")
@@ -26,7 +26,7 @@ def run_stubtest(dist: Path, *, verbose: bool = False, specified_stubs_only: boo
2626
return True
2727

2828
if sys.platform not in stubtest_settings.platforms:
29-
if specified_stubs_only:
29+
if specified_platforms_only:
3030
print(colored("skipping (platform not specified in METADATA.toml)", "yellow"))
3131
return True
3232
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:
154154
parser.add_argument("--num-shards", type=int, default=1)
155155
parser.add_argument("--shard-index", type=int, default=0)
156156
parser.add_argument(
157-
"--specified-stubs-only",
157+
"--specified-platforms-only",
158158
action="store_true",
159159
help="skip the test if the current platform is not specified in METADATA.toml/tool.stubtest.platforms",
160160
)
@@ -171,7 +171,7 @@ def main() -> NoReturn:
171171
for i, dist in enumerate(dists):
172172
if i % args.num_shards != args.shard_index:
173173
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):
175175
result = 1
176176
sys.exit(result)
177177

0 commit comments

Comments
 (0)