Skip to content

Commit

Permalink
stubtest: ignore __main__ module (#12218)
Browse files Browse the repository at this point in the history
Co-authored-by: hauntsaninja <>
  • Loading branch information
hauntsaninja authored Feb 20, 2022
1 parent 9af578d commit f98881c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mypy/stubtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1287,7 +1287,8 @@ def test_stubs(args: argparse.Namespace, use_builtins_fixtures: bool = False) ->
if args.check_typeshed:
assert not args.modules, "Cannot pass both --check-typeshed and a list of modules"
modules = get_typeshed_stdlib_modules(args.custom_typeshed_dir)
annoying_modules = {"antigravity", "this"}
# typeshed added a stub for __main__, but that causes stubtest to check itself
annoying_modules = {"antigravity", "this", "__main__"}
modules = [m for m in modules if m not in annoying_modules]

assert modules, "No modules to check"
Expand Down

0 comments on commit f98881c

Please sign in to comment.