Skip to content

Commit f98881c

Browse files
authored
stubtest: ignore __main__ module (python#12218)
Co-authored-by: hauntsaninja <>
1 parent 9af578d commit f98881c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mypy/stubtest.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1287,7 +1287,8 @@ def test_stubs(args: argparse.Namespace, use_builtins_fixtures: bool = False) ->
12871287
if args.check_typeshed:
12881288
assert not args.modules, "Cannot pass both --check-typeshed and a list of modules"
12891289
modules = get_typeshed_stdlib_modules(args.custom_typeshed_dir)
1290-
annoying_modules = {"antigravity", "this"}
1290+
# typeshed added a stub for __main__, but that causes stubtest to check itself
1291+
annoying_modules = {"antigravity", "this", "__main__"}
12911292
modules = [m for m in modules if m not in annoying_modules]
12921293

12931294
assert modules, "No modules to check"

0 commit comments

Comments
 (0)