Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion mypy/stubtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,11 @@ def verify_typeinfo(
return

yield from _verify_final(stub, runtime, object_path)
yield from _verify_disjoint_base(stub, runtime, object_path)

# TODO: Once PEP 800 gets accepted, remove the conditional (always verify)
if "--ignore-disjoint-bases" not in sys.argv[1:]:
yield from _verify_disjoint_base(stub, runtime, object_path)

is_runtime_typeddict = stub.typeddict_type is not None and is_typeddict(runtime)
yield from _verify_metaclass(
stub, runtime, object_path, is_runtime_typeddict=is_runtime_typeddict
Expand Down Expand Up @@ -2364,6 +2368,12 @@ def parse_options(args: list[str]) -> _Arguments:
action="store_true",
help="Ignore errors for whether an argument should or shouldn't be positional-only",
)
# TODO: Remove once PEP 800 is accepted
parser.add_argument(
"--ignore-disjoint-bases",
action="store_true",
help="Disable checks for PEP 800 @disjoint_base classes",
)
parser.add_argument(
"--allowlist",
"--whitelist",
Expand Down
Loading