From 19ebf8bae6c3e1952739340c8c1301a89dd55318 Mon Sep 17 00:00:00 2001 From: Brian Schubert Date: Sat, 4 Apr 2026 10:38:08 -0400 Subject: [PATCH] Run stubtest with `--strict-type-check-only` (#15604) --- tests/stubtest_stdlib.py | 1 + tests/stubtest_third_party.py | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/stubtest_stdlib.py b/tests/stubtest_stdlib.py index ac794eb4b..3c3a89e93 100755 --- a/tests/stubtest_stdlib.py +++ b/tests/stubtest_stdlib.py @@ -28,6 +28,7 @@ def run_stubtest(typeshed_dir: Path) -> int: "mypy.stubtest", "--check-typeshed", "--show-traceback", + "--strict-type-check-only", "--custom-typeshed-dir", str(typeshed_dir), *allowlist_stubtest_arguments("stdlib"), diff --git a/tests/stubtest_third_party.py b/tests/stubtest_third_party.py index bb69d1232..70bb8d0c1 100755 --- a/tests/stubtest_third_party.py +++ b/tests/stubtest_third_party.py @@ -109,6 +109,7 @@ def run_stubtest(dist: Path, *, verbose: bool = False, ci_platforms_only: bool = "--mypy-config-file", temp.name, "--show-traceback", + "--strict-type-check-only", # Use --custom-typeshed-dir in case we make linked changes to stdlib or _typeshed "--custom-typeshed-dir", str(dist.parent.parent),