Skip to content

Commit 3c69535

Browse files
committed
stubtest: temporary --ignore-disjoint-bases flag
1 parent dcb4d69 commit 3c69535

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

mypy/stubtest.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,11 @@ def verify_typeinfo(
630630
return
631631

632632
yield from _verify_final(stub, runtime, object_path)
633-
yield from _verify_disjoint_base(stub, runtime, object_path)
633+
634+
# TODO: Once PEP 800 gets accepted, remove the conditional (always verify)
635+
if "--ignore-disjoint-bases" not in sys.argv[1:]:
636+
yield from _verify_disjoint_base(stub, runtime, object_path)
637+
634638
is_runtime_typeddict = stub.typeddict_type is not None and is_typeddict(runtime)
635639
yield from _verify_metaclass(
636640
stub, runtime, object_path, is_runtime_typeddict=is_runtime_typeddict
@@ -2364,6 +2368,12 @@ def parse_options(args: list[str]) -> _Arguments:
23642368
action="store_true",
23652369
help="Ignore errors for whether an argument should or shouldn't be positional-only",
23662370
)
2371+
# TODO: Remove once PEP 800 is accepted
2372+
parser.add_argument(
2373+
"--ignore-disjoint-bases",
2374+
action="store_true",
2375+
help="Disable checks for PEP 800 @disjoint_base classes",
2376+
)
23672377
parser.add_argument(
23682378
"--allowlist",
23692379
"--whitelist",

0 commit comments

Comments
 (0)