diff --git a/mypy/meet.py b/mypy/meet.py
--- a/mypy/meet.py
+++ b/mypy/meet.py
@@ -361,8 +361,8 @@ def _type_object_overlap(left: Type, right: Type) -> bool:
         """Special cases for type object types overlaps."""
         # TODO: these checks are a bit in gray area, adjust if they cause problems.
         left, right = get_proper_types((left, right))
-        # 1. Type[C] vs Callable[..., C], where the latter is class object.
-        if isinstance(left, TypeType) and isinstance(right, CallableType) and right.is_type_obj():
+        # 1. Type[C] vs Callable[..., C] overlap even if the latter is not class object.
+        if isinstance(left, TypeType) and isinstance(right, CallableType):
             return _is_overlapping_types(left.item, right.ret_type)
         # 2. Type[C] vs Meta, where Meta is a metaclass for C.
         if isinstance(left, TypeType) and isinstance(right, Instance):
@@ -381,13 +381,18 @@ def _type_object_overlap(left: Type, right: Type) -> bool:
         return _type_object_overlap(left, right) or _type_object_overlap(right, left)
 
     if isinstance(left, CallableType) and isinstance(right, CallableType):
-        return is_callable_compatible(
-            left,
-            right,
-            is_compat=_is_overlapping_types,
-            ignore_pos_arg_names=True,
-            allow_partial_overlap=True,
-        )
+
+        def _callable_overlap(left: CallableType, right: CallableType) -> bool:
+            return is_callable_compatible(
+                left,
+                right,
+                is_compat=_is_overlapping_types,
+                ignore_pos_arg_names=True,
+                allow_partial_overlap=True,
+            )
+
+        # Compare both directions to handle type objects.
+        return _callable_overlap(left, right) or _callable_overlap(right, left)
     elif isinstance(left, CallableType):
         left = left.fallback
     elif isinstance(right, CallableType):
diff --git a/mypy/subtypes.py b/mypy/subtypes.py
--- a/mypy/subtypes.py
+++ b/mypy/subtypes.py
@@ -65,26 +65,50 @@
 IS_CLASSVAR: Final = 2
 IS_CLASS_OR_STATIC: Final = 3
 
-TypeParameterChecker: _TypeAlias = Callable[[Type, Type, int], bool]
+TypeParameterChecker: _TypeAlias = Callable[[Type, Type, int, bool], bool]
 
 
-def check_type_parameter(lefta: Type, righta: Type, variance: int) -> bool:
-    if variance == COVARIANT:
-        return is_subtype(lefta, righta)
-    elif variance == CONTRAVARIANT:
-        return is_subtype(righta, lefta)
-    else:
-        return is_equivalent(lefta, righta)
-
+class SubtypeContext:
+    def __init__(
+        self,
+        *,
+        # Non-proper subtype flags
+        ignore_type_params: bool = False,
+        ignore_pos_arg_names: bool = False,
+        ignore_declared_variance: bool = False,
+        # Supported for both proper and non-proper
+        ignore_promotions: bool = False,
+        # Proper subtype flags
+        erase_instances: bool = False,
+        keep_erased_types: bool = False,
+        options: Optional[Options] = None,
+    ) -> None:
+        self.ignore_type_params = ignore_type_params
+        self.ignore_pos_arg_names = ignore_pos_arg_names
+        self.ignore_declared_variance = ignore_declared_variance
+        self.ignore_promotions = ignore_promotions
+        self.erase_instances = erase_instances
+        self.keep_erased_types = keep_erased_types
+        self.options = options
 
-def ignore_type_parameter(s: Type, t: Type, v: int) -> bool:
-    return True
+    def check_context(self, proper_subtype: bool) -> None:
+        # Historically proper and non-proper subtypes were defined using different helpers
+        # and different visitors. Check if flag values are such that we definitely support.
+        if proper_subtype:
+            assert (
+                not self.ignore_type_params
+                and not self.ignore_pos_arg_names
+                and not self.ignore_declared_variance
+            )
+        else:
+            assert not self.erase_instances and not self.keep_erased_types
 
 
 def is_subtype(
     left: Type,
     right: Type,
     *,
+    subtype_context: Optional[SubtypeContext] = None,
     ignore_type_params: bool = False,
     ignore_pos_arg_names: bool = False,
     ignore_declared_variance: bool = False,
@@ -102,6 +126,24 @@ def is_subtype(
     between the type arguments (e.g., A and B), taking the variance of the
     type var into account.
     """
+    if subtype_context is None:
+        subtype_context = SubtypeContext(
+            ignore_type_params=ignore_type_params,
+            ignore_pos_arg_names=ignore_pos_arg_names,
+            ignore_declared_variance=ignore_declared_variance,
+            ignore_promotions=ignore_promotions,
+            options=options,
+        )
+    else:
+        assert not any(
+            {
+                ignore_type_params,
+                ignore_pos_arg_names,
+                ignore_declared_variance,
+                ignore_promotions,
+                options,
+            }
+        ), "Don't pass both context and individual flags"
     if TypeState.is_assumed_subtype(left, right):
         return True
     if (
@@ -129,63 +171,107 @@ def is_subtype(
         #     B = Union[int, Tuple[B, ...]]
         # When checking if A <: B we push pair (A, B) onto 'assuming' stack, then when after few
         # steps we come back to initial call is_subtype(A, B) and immediately return True.
-        with pop_on_exit(TypeState._assuming, left, right):
-            return _is_subtype(
-                left,
-                right,
-                ignore_type_params=ignore_type_params,
-                ignore_pos_arg_names=ignore_pos_arg_names,
-                ignore_declared_variance=ignore_declared_variance,
-                ignore_promotions=ignore_promotions,
-                options=options,
-            )
-    return _is_subtype(
-        left,
-        right,
-        ignore_type_params=ignore_type_params,
-        ignore_pos_arg_names=ignore_pos_arg_names,
-        ignore_declared_variance=ignore_declared_variance,
-        ignore_promotions=ignore_promotions,
-        options=options,
-    )
+        with pop_on_exit(TypeState.get_assumptions(is_proper=False), left, right):
+            return _is_subtype(left, right, subtype_context, proper_subtype=False)
+    return _is_subtype(left, right, subtype_context, proper_subtype=False)
 
 
-def _is_subtype(
+def is_proper_subtype(
     left: Type,
     right: Type,
     *,
+    subtype_context: Optional[SubtypeContext] = None,
+    ignore_promotions: bool = False,
+    erase_instances: bool = False,
+    keep_erased_types: bool = False,
+) -> bool:
+    """Is left a proper subtype of right?
+
+    For proper subtypes, there's no need to rely on compatibility due to
+    Any types. Every usable type is a proper subtype of itself.
+
+    If erase_instances is True, erase left instance *after* mapping it to supertype
+    (this is useful for runtime isinstance() checks). If keep_erased_types is True,
+    do not consider ErasedType a subtype of all types (used by type inference against unions).
+    """
+    if subtype_context is None:
+        subtype_context = SubtypeContext(
+            ignore_promotions=ignore_promotions,
+            erase_instances=erase_instances,
+            keep_erased_types=keep_erased_types,
+        )
+    else:
+        assert not any(
+            {ignore_promotions, erase_instances, keep_erased_types}
+        ), "Don't pass both context and individual flags"
+    if TypeState.is_assumed_proper_subtype(left, right):
+        return True
+    if (
+        isinstance(left, TypeAliasType)
+        and isinstance(right, TypeAliasType)
+        and left.is_recursive
+        and right.is_recursive
+    ):
+        # Same as for non-proper subtype, see detailed comment there for explanation.
+        with pop_on_exit(TypeState.get_assumptions(is_proper=True), left, right):
+            return _is_subtype(left, right, subtype_context, proper_subtype=True)
+    return _is_subtype(left, right, subtype_context, proper_subtype=True)
+
+
+def is_equivalent(
+    a: Type,
+    b: Type,
+    *,
     ignore_type_params: bool = False,
     ignore_pos_arg_names: bool = False,
-    ignore_declared_variance: bool = False,
-    ignore_promotions: bool = False,
     options: Optional[Options] = None,
 ) -> bool:
+    return is_subtype(
+        a,
+        b,
+        ignore_type_params=ignore_type_params,
+        ignore_pos_arg_names=ignore_pos_arg_names,
+        options=options,
+    ) and is_subtype(
+        b,
+        a,
+        ignore_type_params=ignore_type_params,
+        ignore_pos_arg_names=ignore_pos_arg_names,
+        options=options,
+    )
+
+
+# This is a common entry point for subtyping checks (both proper and non-proper).
+# Never call this private function directly, use the public versions.
+def _is_subtype(
+    left: Type, right: Type, subtype_context: SubtypeContext, proper_subtype: bool
+) -> bool:
+    subtype_context.check_context(proper_subtype)
     orig_right = right
     orig_left = left
     left = get_proper_type(left)
     right = get_proper_type(right)
 
-    if (
+    if not proper_subtype and (
         isinstance(right, AnyType)
         or isinstance(right, UnboundType)
         or isinstance(right, ErasedType)
     ):
+        # TODO: should we consider all types proper subtypes of UnboundType and/or
+        # ErasedType as we do for non-proper subtyping.
         return True
-    elif isinstance(right, UnionType) and not isinstance(left, UnionType):
+
+    def check_item(left: Type, right: Type, subtype_context: SubtypeContext) -> bool:
+        if proper_subtype:
+            return is_proper_subtype(left, right, subtype_context=subtype_context)
+        return is_subtype(left, right, subtype_context=subtype_context)
+
+    if isinstance(right, UnionType) and not isinstance(left, UnionType):
         # Normally, when 'left' is not itself a union, the only way
         # 'left' can be a subtype of the union 'right' is if it is a
         # subtype of one of the items making up the union.
         is_subtype_of_item = any(
-            is_subtype(
-                orig_left,
-                item,
-                ignore_type_params=ignore_type_params,
-                ignore_pos_arg_names=ignore_pos_arg_names,
-                ignore_declared_variance=ignore_declared_variance,
-                ignore_promotions=ignore_promotions,
-                options=options,
-            )
-            for item in right.items
+            check_item(orig_left, item, subtype_context) for item in right.items
         )
         # Recombine rhs literal types, to make an enum type a subtype
         # of a union of all enum items as literal types. Only do it if
@@ -199,16 +285,7 @@ def _is_subtype(
         ):
             right = UnionType(mypy.typeops.try_contracting_literals_in_union(right.items))
             is_subtype_of_item = any(
-                is_subtype(
-                    orig_left,
-                    item,
-                    ignore_type_params=ignore_type_params,
-                    ignore_pos_arg_names=ignore_pos_arg_names,
-                    ignore_declared_variance=ignore_declared_variance,
-                    ignore_promotions=ignore_promotions,
-                    options=options,
-                )
-                for item in right.items
+                check_item(orig_left, item, subtype_context) for item in right.items
             )
         # However, if 'left' is a type variable T, T might also have
         # an upper bound which is itself a union. This case will be
@@ -221,105 +298,68 @@ def _is_subtype(
         elif is_subtype_of_item:
             return True
         # otherwise, fall through
-    return left.accept(
-        SubtypeVisitor(
-            orig_right,
-            ignore_type_params=ignore_type_params,
-            ignore_pos_arg_names=ignore_pos_arg_names,
-            ignore_declared_variance=ignore_declared_variance,
-            ignore_promotions=ignore_promotions,
-            options=options,
-        )
-    )
+    return left.accept(SubtypeVisitor(orig_right, subtype_context, proper_subtype))
 
 
-def is_equivalent(
-    a: Type,
-    b: Type,
-    *,
-    ignore_type_params: bool = False,
-    ignore_pos_arg_names: bool = False,
-    options: Optional[Options] = None,
-) -> bool:
-    return is_subtype(
-        a,
-        b,
-        ignore_type_params=ignore_type_params,
-        ignore_pos_arg_names=ignore_pos_arg_names,
-        options=options,
-    ) and is_subtype(
-        b,
-        a,
-        ignore_type_params=ignore_type_params,
-        ignore_pos_arg_names=ignore_pos_arg_names,
-        options=options,
-    )
+def check_type_parameter(lefta: Type, righta: Type, variance: int, proper_subtype: bool) -> bool:
+    def check(left: Type, right: Type) -> bool:
+        return is_proper_subtype(left, right) if proper_subtype else is_subtype(left, right)
+
+    if variance == COVARIANT:
+        return check(lefta, righta)
+    elif variance == CONTRAVARIANT:
+        return check(righta, lefta)
+    else:
+        if proper_subtype:
+            return mypy.sametypes.is_same_type(lefta, righta)
+        return is_equivalent(lefta, righta)
+
+
+def ignore_type_parameter(lefta: Type, righta: Type, variance: int, proper_subtype: bool) -> bool:
+    return True
 
 
 class SubtypeVisitor(TypeVisitor[bool]):
-    def __init__(
-        self,
-        right: Type,
-        *,
-        ignore_type_params: bool,
-        ignore_pos_arg_names: bool = False,
-        ignore_declared_variance: bool = False,
-        ignore_promotions: bool = False,
-        options: Optional[Options] = None,
-    ) -> None:
+    def __init__(self, right: Type, subtype_context: SubtypeContext, proper_subtype: bool) -> None:
         self.right = get_proper_type(right)
         self.orig_right = right
-        self.ignore_type_params = ignore_type_params
-        self.ignore_pos_arg_names = ignore_pos_arg_names
-        self.ignore_declared_variance = ignore_declared_variance
-        self.ignore_promotions = ignore_promotions
+        self.proper_subtype = proper_subtype
+        self.subtype_context = subtype_context
         self.check_type_parameter = (
-            ignore_type_parameter if ignore_type_params else check_type_parameter
-        )
-        self.options = options
-        self._subtype_kind = SubtypeVisitor.build_subtype_kind(
-            ignore_type_params=ignore_type_params,
-            ignore_pos_arg_names=ignore_pos_arg_names,
-            ignore_declared_variance=ignore_declared_variance,
-            ignore_promotions=ignore_promotions,
+            ignore_type_parameter if subtype_context.ignore_type_params else check_type_parameter
         )
+        self.options = subtype_context.options
+        self._subtype_kind = SubtypeVisitor.build_subtype_kind(subtype_context, proper_subtype)
 
     @staticmethod
-    def build_subtype_kind(
-        *,
-        ignore_type_params: bool = False,
-        ignore_pos_arg_names: bool = False,
-        ignore_declared_variance: bool = False,
-        ignore_promotions: bool = False,
-    ) -> SubtypeKind:
+    def build_subtype_kind(subtype_context: SubtypeContext, proper_subtype: bool) -> SubtypeKind:
         return (
             state.strict_optional,
-            False,  # is proper subtype?
-            ignore_type_params,
-            ignore_pos_arg_names,
-            ignore_declared_variance,
-            ignore_promotions,
+            proper_subtype,
+            subtype_context.ignore_type_params,
+            subtype_context.ignore_pos_arg_names,
+            subtype_context.ignore_declared_variance,
+            subtype_context.ignore_promotions,
+            subtype_context.erase_instances,
+            subtype_context.keep_erased_types,
         )
 
     def _is_subtype(self, left: Type, right: Type) -> bool:
-        return is_subtype(
-            left,
-            right,
-            ignore_type_params=self.ignore_type_params,
-            ignore_pos_arg_names=self.ignore_pos_arg_names,
-            ignore_declared_variance=self.ignore_declared_variance,
-            ignore_promotions=self.ignore_promotions,
-            options=self.options,
-        )
+        if self.proper_subtype:
+            return is_proper_subtype(left, right, subtype_context=self.subtype_context)
+        return is_subtype(left, right, subtype_context=self.subtype_context)
 
     # visit_x(left) means: is left (which is an instance of X) a subtype of
     # right?
 
     def visit_unbound_type(self, left: UnboundType) -> bool:
+        # This can be called if there is a bad type annotation. The result probably
+        # doesn't matter much but by returning True we simplify these bad types away
+        # from unions, which could filter out some bogus messages.
         return True
 
     def visit_any(self, left: AnyType) -> bool:
-        return True
+        return isinstance(self.right, AnyType) if self.proper_subtype else True
 
     def visit_none_type(self, left: NoneType) -> bool:
         if state.strict_optional:
@@ -341,13 +381,18 @@ def visit_uninhabited_type(self, left: UninhabitedType) -> bool:
         return True
 
     def visit_erased_type(self, left: ErasedType) -> bool:
+        # This may be encountered during type inference. The result probably doesn't
+        # matter much.
+        # TODO: it actually does matter, figure out more principled logic about this.
+        if self.subtype_context.keep_erased_types:
+            return False
         return True
 
     def visit_deleted_type(self, left: DeletedType) -> bool:
         return True
 
     def visit_instance(self, left: Instance) -> bool:
-        if left.type.fallback_to_any:
+        if left.type.fallback_to_any and not self.proper_subtype:
             if isinstance(self.right, NoneType):
                 # NOTE: `None` is a *non-subclassable* singleton, therefore no class
                 # can by a subtype of it, even with an `Any` fallback.
@@ -361,7 +406,7 @@ def visit_instance(self, left: Instance) -> bool:
         if isinstance(right, Instance):
             if TypeState.is_cached_subtype_check(self._subtype_kind, left, right):
                 return True
-            if not self.ignore_promotions:
+            if not self.subtype_context.ignore_promotions:
                 for base in left.type.mro:
                     if base._promote and any(
                         self._is_subtype(p, self.right) for p in base._promote
@@ -386,9 +431,13 @@ def visit_instance(self, left: Instance) -> bool:
                     rname in TYPED_NAMEDTUPLE_NAMES
                     and any(l.is_named_tuple for l in left.type.mro)
                 )
-            ) and not self.ignore_declared_variance:
+            ) and not self.subtype_context.ignore_declared_variance:
                 # Map left type to corresponding right instances.
                 t = map_instance_to_supertype(left, right.type)
+                if self.subtype_context.erase_instances:
+                    erased = erase_type(t)
+                    assert isinstance(erased, Instance)
+                    t = erased
                 nominal = True
                 if right.type.has_type_var_tuple_type:
                     left_prefix, left_middle, left_suffix = split_with_instance(left)
@@ -464,28 +513,36 @@ def check_mixed(
                     type_params = zip(t.args, right.args, right.type.defn.type_vars)
                 for lefta, righta, tvar in type_params:
                     if isinstance(tvar, TypeVarType):
-                        if not self.check_type_parameter(lefta, righta, tvar.variance):
+                        if not self.check_type_parameter(
+                            lefta, righta, tvar.variance, self.proper_subtype
+                        ):
                             nominal = False
                     else:
-                        if not self.check_type_parameter(lefta, righta, COVARIANT):
+                        if not self.check_type_parameter(
+                            lefta, righta, COVARIANT, self.proper_subtype
+                        ):
                             nominal = False
                 if nominal:
                     TypeState.record_subtype_cache_entry(self._subtype_kind, left, right)
                 return nominal
-            if right.type.is_protocol and is_protocol_implementation(left, right):
+            if right.type.is_protocol and is_protocol_implementation(
+                left, right, proper_subtype=self.proper_subtype
+            ):
                 return True
             return False
         if isinstance(right, TypeType):
             item = right.item
             if isinstance(item, TupleType):
                 item = mypy.typeops.tuple_fallback(item)
-            if is_named_instance(left, "builtins.type"):
-                return self._is_subtype(TypeType(AnyType(TypeOfAny.special_form)), right)
-            if left.type.is_metaclass():
-                if isinstance(item, AnyType):
-                    return True
-                if isinstance(item, Instance):
-                    return is_named_instance(item, "builtins.object")
+            # TODO: this is a bit arbitrary, we should only skip Any-related cases.
+            if not self.proper_subtype:
+                if is_named_instance(left, "builtins.type"):
+                    return self._is_subtype(TypeType(AnyType(TypeOfAny.special_form)), right)
+                if left.type.is_metaclass():
+                    if isinstance(item, AnyType):
+                        return True
+                    if isinstance(item, Instance):
+                        return is_named_instance(item, "builtins.object")
         if isinstance(right, LiteralType) and left.last_known_value is not None:
             return self._is_subtype(left.last_known_value, right)
         if isinstance(right, CallableType):
@@ -535,7 +592,7 @@ def visit_parameters(self, left: Parameters) -> bool:
                 left,
                 right,
                 is_compat=self._is_subtype,
-                ignore_pos_arg_names=self.ignore_pos_arg_names,
+                ignore_pos_arg_names=self.subtype_context.ignore_pos_arg_names,
             )
         else:
             return False
@@ -554,7 +611,7 @@ def visit_callable_type(self, left: CallableType) -> bool:
                 left,
                 right,
                 is_compat=self._is_subtype,
-                ignore_pos_arg_names=self.ignore_pos_arg_names,
+                ignore_pos_arg_names=self.subtype_context.ignore_pos_arg_names,
                 strict_concatenate=self.options.strict_concatenate if self.options else True,
             )
         elif isinstance(right, Overloaded):
@@ -577,7 +634,7 @@ def visit_callable_type(self, left: CallableType) -> bool:
                 left,
                 right,
                 is_compat=self._is_subtype,
-                ignore_pos_arg_names=self.ignore_pos_arg_names,
+                ignore_pos_arg_names=self.subtype_context.ignore_pos_arg_names,
             )
         else:
             return False
@@ -591,7 +648,15 @@ def visit_tuple_type(self, left: TupleType) -> bool:
                 if right.args:
                     iter_type = right.args[0]
                 else:
+                    if self.proper_subtype:
+                        return False
                     iter_type = AnyType(TypeOfAny.special_form)
+                if is_named_instance(right, "builtins.tuple") and isinstance(
+                    get_proper_type(iter_type), AnyType
+                ):
+                    # TODO: We shouldn't need this special case. This is currently needed
+                    #       for isinstance(x, tuple), though it's unclear why.
+                    return True
                 return all(self._is_subtype(li, iter_type) for li in left.items)
             elif self._is_subtype(mypy.typeops.tuple_fallback(left), right):
                 return True
@@ -624,9 +689,16 @@ def visit_typeddict_type(self, left: TypedDictType) -> bool:
             if not left.names_are_wider_than(right):
                 return False
             for name, l, r in left.zip(right):
-                if not is_equivalent(
-                    l, r, ignore_type_params=self.ignore_type_params, options=self.options
-                ):
+                if self.proper_subtype:
+                    check = mypy.sametypes.is_same_type(l, r)
+                else:
+                    check = is_equivalent(
+                        l,
+                        r,
+                        ignore_type_params=self.subtype_context.ignore_type_params,
+                        options=self.options,
+                    )
+                if not check:
                     return False
                 # Non-required key is not compatible with a required key since
                 # indexing may fail unexpectedly if a required key is missing.
@@ -699,14 +771,14 @@ def visit_overloaded(self, left: Overloaded) -> bool:
                             right_item,
                             is_compat=self._is_subtype,
                             ignore_return=True,
-                            ignore_pos_arg_names=self.ignore_pos_arg_names,
+                            ignore_pos_arg_names=self.subtype_context.ignore_pos_arg_names,
                             strict_concatenate=strict_concat,
                         ) or is_callable_compatible(
                             right_item,
                             left_item,
                             is_compat=self._is_subtype,
                             ignore_return=True,
-                            ignore_pos_arg_names=self.ignore_pos_arg_names,
+                            ignore_pos_arg_names=self.subtype_context.ignore_pos_arg_names,
                             strict_concatenate=strict_concat,
                         ):
                             # If this is an overload that's already been matched, there's no
@@ -751,6 +823,9 @@ def visit_union_type(self, left: UnionType) -> bool:
 
     def visit_partial_type(self, left: PartialType) -> bool:
         # This is indeterminate as we don't really know the complete type yet.
+        if self.proper_subtype:
+            # TODO: What's the right thing to do here?
+            return False
         if left.type is None:
             # Special case, partial `None`. This might happen when defining
             # class-level attributes with explicit `None`.
@@ -768,6 +843,10 @@ def visit_type_type(self, left: TypeType) -> bool:
             return self._is_subtype(left.item, right.ret_type)
         if isinstance(right, Instance):
             if right.type.fullname in ["builtins.object", "builtins.type"]:
+                # TODO: Strictly speaking, the type builtins.type is considered equivalent to
+                #       Type[Any]. However, this would break the is_proper_subtype check in
+                #       conditional_types for cases like isinstance(x, type) when the type
+                #       of x is Type[int]. It's unclear what's the right way to address this.
                 return True
             item = left.item
             if isinstance(item, TypeVarType):
@@ -879,9 +958,12 @@ def f(self) -> A: ...
     if not proper_subtype:
         # Nominal check currently ignores arg names, but __call__ is special for protocols
         ignore_names = right.type.protocol_members != ["__call__"]
-        subtype_kind = SubtypeVisitor.build_subtype_kind(ignore_pos_arg_names=ignore_names)
     else:
-        subtype_kind = ProperSubtypeVisitor.build_subtype_kind()
+        ignore_names = False
+    subtype_kind = SubtypeVisitor.build_subtype_kind(
+        subtype_context=SubtypeContext(ignore_pos_arg_names=ignore_names),
+        proper_subtype=proper_subtype,
+    )
     TypeState.record_subtype_cache_entry(subtype_kind, left, right)
     return True
 
@@ -1520,335 +1602,6 @@ def covers_at_runtime(item: Type, supertype: Type, ignore_promotions: bool) -> b
     return False
 
 
-def is_proper_subtype(
-    left: Type,
-    right: Type,
-    *,
-    ignore_promotions: bool = False,
-    erase_instances: bool = False,
-    keep_erased_types: bool = False,
-) -> bool:
-    """Is left a proper subtype of right?
-
-    For proper subtypes, there's no need to rely on compatibility due to
-    Any types. Every usable type is a proper subtype of itself.
-
-    If erase_instances is True, erase left instance *after* mapping it to supertype
-    (this is useful for runtime isinstance() checks). If keep_erased_types is True,
-    do not consider ErasedType a subtype of all types (used by type inference against unions).
-    """
-    if TypeState.is_assumed_proper_subtype(left, right):
-        return True
-    if (
-        isinstance(left, TypeAliasType)
-        and isinstance(right, TypeAliasType)
-        and left.is_recursive
-        and right.is_recursive
-    ):
-        # This case requires special care because it may cause infinite recursion.
-        # See is_subtype() for more info.
-        with pop_on_exit(TypeState._assuming_proper, left, right):
-            return _is_proper_subtype(
-                left,
-                right,
-                ignore_promotions=ignore_promotions,
-                erase_instances=erase_instances,
-                keep_erased_types=keep_erased_types,
-            )
-    return _is_proper_subtype(
-        left,
-        right,
-        ignore_promotions=ignore_promotions,
-        erase_instances=erase_instances,
-        keep_erased_types=keep_erased_types,
-    )
-
-
-def _is_proper_subtype(
-    left: Type,
-    right: Type,
-    *,
-    ignore_promotions: bool = False,
-    erase_instances: bool = False,
-    keep_erased_types: bool = False,
-) -> bool:
-    orig_left = left
-    orig_right = right
-    left = get_proper_type(left)
-    right = get_proper_type(right)
-
-    if isinstance(right, UnionType) and not isinstance(left, UnionType):
-        return any(
-            is_proper_subtype(
-                orig_left,
-                item,
-                ignore_promotions=ignore_promotions,
-                erase_instances=erase_instances,
-                keep_erased_types=keep_erased_types,
-            )
-            for item in right.items
-        )
-    return left.accept(
-        ProperSubtypeVisitor(
-            orig_right,
-            ignore_promotions=ignore_promotions,
-            erase_instances=erase_instances,
-            keep_erased_types=keep_erased_types,
-        )
-    )
-
-
-class ProperSubtypeVisitor(TypeVisitor[bool]):
-    def __init__(
-        self,
-        right: Type,
-        *,
-        ignore_promotions: bool = False,
-        erase_instances: bool = False,
-        keep_erased_types: bool = False,
-    ) -> None:
-        self.right = get_proper_type(right)
-        self.orig_right = right
-        self.ignore_promotions = ignore_promotions
-        self.erase_instances = erase_instances
-        self.keep_erased_types = keep_erased_types
-        self._subtype_kind = ProperSubtypeVisitor.build_subtype_kind(
-            ignore_promotions=ignore_promotions,
-            erase_instances=erase_instances,
-            keep_erased_types=keep_erased_types,
-        )
-
-    @staticmethod
-    def build_subtype_kind(
-        *,
-        ignore_promotions: bool = False,
-        erase_instances: bool = False,
-        keep_erased_types: bool = False,
-    ) -> SubtypeKind:
-        return (state.strict_optional, True, ignore_promotions, erase_instances, keep_erased_types)
-
-    def _is_proper_subtype(self, left: Type, right: Type) -> bool:
-        return is_proper_subtype(
-            left,
-            right,
-            ignore_promotions=self.ignore_promotions,
-            erase_instances=self.erase_instances,
-            keep_erased_types=self.keep_erased_types,
-        )
-
-    def visit_unbound_type(self, left: UnboundType) -> bool:
-        # This can be called if there is a bad type annotation. The result probably
-        # doesn't matter much but by returning True we simplify these bad types away
-        # from unions, which could filter out some bogus messages.
-        return True
-
-    def visit_any(self, left: AnyType) -> bool:
-        return isinstance(self.right, AnyType)
-
-    def visit_none_type(self, left: NoneType) -> bool:
-        if state.strict_optional:
-            return isinstance(self.right, NoneType) or is_named_instance(
-                self.right, "builtins.object"
-            )
-        return True
-
-    def visit_uninhabited_type(self, left: UninhabitedType) -> bool:
-        return True
-
-    def visit_erased_type(self, left: ErasedType) -> bool:
-        # This may be encountered during type inference. The result probably doesn't
-        # matter much.
-        # TODO: it actually does matter, figure out more principled logic about this.
-        if self.keep_erased_types:
-            return False
-        return True
-
-    def visit_deleted_type(self, left: DeletedType) -> bool:
-        return True
-
-    def visit_instance(self, left: Instance) -> bool:
-        right = self.right
-        if isinstance(right, Instance):
-            if TypeState.is_cached_subtype_check(self._subtype_kind, left, right):
-                return True
-            if not self.ignore_promotions:
-                for base in left.type.mro:
-                    if base._promote and any(
-                        self._is_proper_subtype(p, right) for p in base._promote
-                    ):
-                        TypeState.record_subtype_cache_entry(self._subtype_kind, left, right)
-                        return True
-
-            if left.type.has_base(right.type.fullname):
-                # Map left type to corresponding right instances.
-                left = map_instance_to_supertype(left, right.type)
-                if self.erase_instances:
-                    erased = erase_type(left)
-                    assert isinstance(erased, Instance)
-                    left = erased
-
-                nominal = True
-                for ta, ra, tvar in zip(left.args, right.args, right.type.defn.type_vars):
-                    if isinstance(tvar, TypeVarType):
-                        variance = tvar.variance
-                        if variance == COVARIANT:
-                            nominal = self._is_proper_subtype(ta, ra)
-                        elif variance == CONTRAVARIANT:
-                            nominal = self._is_proper_subtype(ra, ta)
-                        else:
-                            nominal = mypy.sametypes.is_same_type(ta, ra)
-                    else:
-                        nominal = mypy.sametypes.is_same_type(ta, ra)
-                    if not nominal:
-                        break
-
-                if nominal:
-                    TypeState.record_subtype_cache_entry(self._subtype_kind, left, right)
-                return nominal
-            if right.type.is_protocol and is_protocol_implementation(
-                left, right, proper_subtype=True
-            ):
-                return True
-            return False
-        if isinstance(right, CallableType):
-            call = find_member("__call__", left, left, is_operator=True)
-            if call:
-                return self._is_proper_subtype(call, right)
-            return False
-        return False
-
-    def visit_type_var(self, left: TypeVarType) -> bool:
-        if isinstance(self.right, TypeVarType) and left.id == self.right.id:
-            return True
-        if left.values and self._is_proper_subtype(
-            mypy.typeops.make_simplified_union(left.values), self.right
-        ):
-            return True
-        return self._is_proper_subtype(left.upper_bound, self.right)
-
-    def visit_param_spec(self, left: ParamSpecType) -> bool:
-        right = self.right
-        if (
-            isinstance(right, ParamSpecType)
-            and right.id == left.id
-            and right.flavor == left.flavor
-        ):
-            return True
-        return self._is_proper_subtype(left.upper_bound, self.right)
-
-    def visit_type_var_tuple(self, left: TypeVarTupleType) -> bool:
-        right = self.right
-        if isinstance(right, TypeVarTupleType) and right.id == left.id:
-            return True
-        return self._is_proper_subtype(left.upper_bound, self.right)
-
-    def visit_unpack_type(self, left: UnpackType) -> bool:
-        if isinstance(self.right, UnpackType):
-            return self._is_proper_subtype(left.type, self.right.type)
-        return False
-
-    def visit_parameters(self, left: Parameters) -> bool:
-        right = self.right
-        if isinstance(right, Parameters) or isinstance(right, CallableType):
-            return are_parameters_compatible(left, right, is_compat=self._is_proper_subtype)
-        else:
-            return False
-
-    def visit_callable_type(self, left: CallableType) -> bool:
-        right = self.right
-        if isinstance(right, CallableType):
-            return is_callable_compatible(left, right, is_compat=self._is_proper_subtype)
-        elif isinstance(right, Overloaded):
-            return all(self._is_proper_subtype(left, item) for item in right.items)
-        elif isinstance(right, Instance):
-            return self._is_proper_subtype(left.fallback, right)
-        elif isinstance(right, TypeType):
-            # This is unsound, we don't check the __init__ signature.
-            return left.is_type_obj() and self._is_proper_subtype(left.ret_type, right.item)
-        return False
-
-    def visit_tuple_type(self, left: TupleType) -> bool:
-        right = self.right
-        if isinstance(right, Instance):
-            if is_named_instance(right, TUPLE_LIKE_INSTANCE_NAMES):
-                if not right.args:
-                    return False
-                iter_type = get_proper_type(right.args[0])
-                if is_named_instance(right, "builtins.tuple") and isinstance(iter_type, AnyType):
-                    # TODO: We shouldn't need this special case. This is currently needed
-                    #       for isinstance(x, tuple), though it's unclear why.
-                    return True
-                return all(self._is_proper_subtype(li, iter_type) for li in left.items)
-            return self._is_proper_subtype(mypy.typeops.tuple_fallback(left), right)
-        elif isinstance(right, TupleType):
-            if len(left.items) != len(right.items):
-                return False
-            for l, r in zip(left.items, right.items):
-                if not self._is_proper_subtype(l, r):
-                    return False
-            return self._is_proper_subtype(
-                mypy.typeops.tuple_fallback(left), mypy.typeops.tuple_fallback(right)
-            )
-        return False
-
-    def visit_typeddict_type(self, left: TypedDictType) -> bool:
-        right = self.right
-        if isinstance(right, TypedDictType):
-            for name, typ in left.items.items():
-                if name in right.items and not mypy.sametypes.is_same_type(typ, right.items[name]):
-                    return False
-            for name, typ in right.items.items():
-                if name not in left.items:
-                    return False
-            return True
-        return self._is_proper_subtype(left.fallback, right)
-
-    def visit_literal_type(self, left: LiteralType) -> bool:
-        if isinstance(self.right, LiteralType):
-            return left == self.right
-        else:
-            return self._is_proper_subtype(left.fallback, self.right)
-
-    def visit_overloaded(self, left: Overloaded) -> bool:
-        # TODO: What's the right thing to do here?
-        return False
-
-    def visit_union_type(self, left: UnionType) -> bool:
-        return all(self._is_proper_subtype(item, self.orig_right) for item in left.items)
-
-    def visit_partial_type(self, left: PartialType) -> bool:
-        # TODO: What's the right thing to do here?
-        return False
-
-    def visit_type_type(self, left: TypeType) -> bool:
-        right = self.right
-        if isinstance(right, TypeType):
-            # This is unsound, we don't check the __init__ signature.
-            return self._is_proper_subtype(left.item, right.item)
-        if isinstance(right, CallableType):
-            # This is also unsound because of __init__.
-            return right.is_type_obj() and self._is_proper_subtype(left.item, right.ret_type)
-        if isinstance(right, Instance):
-            if right.type.fullname == "builtins.type":
-                # TODO: Strictly speaking, the type builtins.type is considered equivalent to
-                #       Type[Any]. However, this would break the is_proper_subtype check in
-                #       conditional_types for cases like isinstance(x, type) when the type
-                #       of x is Type[int]. It's unclear what's the right way to address this.
-                return True
-            if right.type.fullname == "builtins.object":
-                return True
-            item = left.item
-            if isinstance(item, TypeVarType):
-                item = get_proper_type(item.upper_bound)
-            if isinstance(item, Instance):
-                metaclass = item.type.metaclass_type
-                return metaclass is not None and self._is_proper_subtype(metaclass, right)
-        return False
-
-    def visit_type_alias_type(self, left: TypeAliasType) -> bool:
-        assert False, f"This should be never called, got {left}"
-
-
 def is_more_precise(left: Type, right: Type, *, ignore_promotions: bool = False) -> bool:
     """Check if left is a more precise type than right.
 
diff --git a/mypy/typestate.py b/mypy/typestate.py
--- a/mypy/typestate.py
+++ b/mypy/typestate.py
@@ -108,6 +108,12 @@ def is_assumed_proper_subtype(left: Type, right: Type) -> bool:
                 return True
         return False
 
+    @staticmethod
+    def get_assumptions(is_proper: bool) -> List[Tuple[TypeAliasType, TypeAliasType]]:
+        if is_proper:
+            return TypeState._assuming_proper
+        return TypeState._assuming
+
     @staticmethod
     def reset_all_subtype_caches() -> None:
         """Completely reset all known subtype caches."""

diff --git a/mypy/test/testtypes.py b/mypy/test/testtypes.py
--- a/mypy/test/testtypes.py
+++ b/mypy/test/testtypes.py
@@ -535,7 +535,7 @@ def test_simplified_union_with_literals(self) -> None:
             [fx.lit1_inst, fx.lit3_inst], UnionType([fx.lit1_inst, fx.lit3_inst])
         )
         self.assert_simplified_union([fx.lit1_inst, fx.uninhabited], fx.lit1_inst)
-        self.assert_simplified_union([fx.lit1, fx.lit1_inst], UnionType([fx.lit1, fx.lit1_inst]))
+        self.assert_simplified_union([fx.lit1, fx.lit1_inst], fx.lit1)
         self.assert_simplified_union([fx.lit1, fx.lit2_inst], UnionType([fx.lit1, fx.lit2_inst]))
         self.assert_simplified_union([fx.lit1, fx.lit3_inst], UnionType([fx.lit1, fx.lit3_inst]))
 
diff --git a/test-data/unit/check-expressions.test b/test-data/unit/check-expressions.test
--- a/test-data/unit/check-expressions.test
+++ b/test-data/unit/check-expressions.test
@@ -2166,6 +2166,19 @@ if x in (1, 2):
 [builtins fixtures/tuple.pyi]
 [typing fixtures/typing-full.pyi]
 
+
+[case testOverlappingClassCallables]
+# flags: --strict-equality
+from typing import Any, Callable, Type
+
+x: Type[int]
+y: Callable[[], Any]
+x == y
+y == x
+int == y
+y == int
+[builtins fixtures/bool.pyi]
+
 [case testUnimportedHintAny]
 def f(x: Any) -> None:  # E: Name "Any" is not defined \
                         # N: Did you forget to import it from "typing"? (Suggestion: "from typing import Any")
diff --git a/test-data/unit/check-overloading.test b/test-data/unit/check-overloading.test
--- a/test-data/unit/check-overloading.test
+++ b/test-data/unit/check-overloading.test
@@ -5274,14 +5274,14 @@ def f2(g: G[A, B], x: int = ...) -> B: ...
 def f2(g: Any, x: int = ...) -> Any: ...
 
 [case testOverloadTypeVsCallable]
-from typing import TypeVar, Type, Callable, Any, overload
+from typing import TypeVar, Type, Callable, Any, overload, Optional
 class Foo:
     def __init__(self, **kwargs: Any): pass
 _T = TypeVar('_T')
 @overload
 def register(cls: Type[_T]) -> int: ...
 @overload
-def register(cls: Callable[..., _T]) -> str: ...
+def register(cls: Callable[..., _T]) -> Optional[int]: ...
 def register(cls: Any) -> Any: return None
 
 

is_subtype vs is_proper_subtype
Currently, we have two functions ``is_subtype`` and ``is_proper_subtype``. There are two corresponding visitors: ``SubtypeVisitor`` and ``ProperSubtypeVisitor``, both of them implement some complex logic.
I think that _ideally_ there should be only one visitor, ``ProperSubtypeVisitor``, and ``is_subtype`` should be simply:
```python
def is_subtype(left, right):
    if isinstance(left, AnyType) or isinstance(right, AnyType):
        return True
    return is_proper_subtype(left, right)
```
Are there any reasons why it is not possible now? Maybe this question already exists in a roadmap mentioned in https://github.com/python/mypy/issues/3194 (btw @JukkaL @ddfisher is it possible to make it public?)

(I have found this issue https://github.com/python/mypy/issues/2038, but I am not sure it is up to date.)

It's more complex than that, since `List[str]` is considered a subtype of `List[Any]`, etc. Maybe we could have a flag for `SubtypeVisitor` that indicates whether we should be taking a proper or normal subtype. I thought about merging the two when writing the proper subtype visitor, but it didn't seem obvious at that time that combining would make the code easier to read or maintain. However, it might well be worth it, since they duplicate a lot of logic.
mypy/test/testtypes.py::TypeOpsSuite::test_nonempty_tuple_always_true mypy/test/testtypes.py::MeetSuite::test_type_type mypy/test/testtypes.py::TypesSuite::test_any mypy/test/testtypes.py::MeetSuite::test_type_vars mypy/test/testtypes.py::TypesSuite::test_callable_type mypy/test/testtypes.py::TypeOpsSuite::test_simplified_union mypy/test/testtypes.py::MeetSuite::test_unbound_type mypy/test/testtypes.py::JoinSuite::test_literal_type mypy/test/testtypes.py::TypesSuite::test_callable_type_with_default_args mypy/test/testtypes.py::TypesSuite::test_callable_type_with_var_args mypy/test/testtypes.py::SameTypeSuite::test_literal_type mypy/test/testtypes.py::JoinSuite::test_mixed_truth_restricted_type mypy/test/testtypes.py::TypesSuite::test_generic_function_type mypy/test/testtypes.py::TypeOpsSuite::test_simplified_union_with_mixed_str_literals mypy/test/testtypes.py::TypesSuite::test_generic_unbound_type mypy/test/testtypes.py::JoinSuite::test_mixed_truth_restricted_type_simple mypy/test/testtypes.py::RemoveLastKnownValueSuite::test_generics mypy/test/testtypes.py::RemoveLastKnownValueSuite::test_last_known_values_with_merge mypy/test/testtypes.py::RemoveLastKnownValueSuite::test_multiple_same_instances mypy/test/testtypes.py::TypesSuite::test_indirection_no_infinite_recursion mypy/test/testtypes.py::JoinSuite::test_none mypy/test/testtypes.py::TypesSuite::test_simple_unbound_type mypy/test/testtypes.py::TypeOpsSuite::test_simplified_union_with_str_instance_literals mypy/test/testtypes.py::TypeOpsSuite::test_simplified_union_with_str_literals mypy/test/testtypes.py::RemoveLastKnownValueSuite::test_optional mypy/test/testtypes.py::RemoveLastKnownValueSuite::test_single_last_known_value mypy/test/testtypes.py::TypesSuite::test_tuple_type mypy/test/testtypes.py::JoinSuite::test_other_mixed_types mypy/test/testtypes.py::TypesSuite::test_type_alias_expand_all mypy/test/testtypes.py::RemoveLastKnownValueSuite::test_two_instances mypy/test/testtypes.py::TypesSuite::test_type_alias_expand_once mypy/test/testtypes.py::TypesSuite::test_type_variable_binding mypy/test/testtypes.py::JoinSuite::test_overloaded mypy/test/testtypes.py::TypeOpsSuite::test_empty_tuple_always_false mypy/test/testtypes.py::JoinSuite::test_overloaded_with_any mypy/test/testtypes.py::TypeOpsSuite::test_erase_with_function_type mypy/test/testtypes.py::TypeOpsSuite::test_erase_with_generic_type mypy/test/testtypes.py::JoinSuite::test_simple_generics mypy/test/testtypes.py::TypeOpsSuite::test_erase_with_generic_type_recursive mypy/test/testtypes.py::JoinSuite::test_simple_type_objects mypy/test/testtypes.py::TypeOpsSuite::test_erase_with_tuple_type mypy/test/testtypes.py::JoinSuite::test_trivial_cases mypy/test/testtypes.py::TypeOpsSuite::test_erase_with_type_object mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testNoneAsRvalue mypy/test/testtypes.py::JoinSuite::test_tuples mypy/test/testtypes.py::JoinSuite::test_type_type mypy/test/testtypes.py::JoinSuite::test_type_vars mypy/test/testtypes.py::TypeOpsSuite::test_erase_with_type_type mypy/test/testtypes.py::TypeOpsSuite::test_erase_with_type_variable mypy/test/testtypes.py::TypeOpsSuite::test_expand_basic_generic_types mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testNoneAsArgument mypy/test/testtypes.py::TypeOpsSuite::test_expand_naked_type_var mypy/test/testtypes.py::JoinSuite::test_unbound_type mypy/test/testtypes.py::TypeOpsSuite::test_false_only_of_false_type_is_idempotent mypy/test/testtypes.py::JoinSuite::test_var_tuples mypy/test/testtypes.py::TypeOpsSuite::test_false_only_of_instance mypy/test/testtypes.py::MeetSuite::test_callables_with_dynamic mypy/test/testtypes.py::TypeOpsSuite::test_false_only_of_true_type_is_uninhabited mypy/test/testtypes.py::MeetSuite::test_class_subtyping mypy/test/testtypes.py::TypeOpsSuite::test_false_only_of_union mypy/test/testtypes.py::MeetSuite::test_dynamic_type mypy/test/testtypes.py::TypeOpsSuite::test_false_only_tuple mypy/test/testtypes.py::MeetSuite::test_function_types mypy/test/testtypes.py::TypeOpsSuite::test_is_more_precise mypy/test/testtypes.py::MeetSuite::test_generic_types_and_dynamic mypy/test/testtypes.py::MeetSuite::test_generics_with_inheritance mypy/test/testtypes.py::TypeOpsSuite::test_is_proper_subtype mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testIntLiteral mypy/test/testtypes.py::MeetSuite::test_generics_with_inheritance_and_shared_supertype mypy/test/testtypes.py::TypeOpsSuite::test_is_proper_subtype_and_subtype_literal_types mypy/test/testtypes.py::MeetSuite::test_generics_with_multiple_args mypy/test/testtypes.py::TypeOpsSuite::test_is_proper_subtype_contravariance mypy/test/testtypes.py::MeetSuite::test_literal_type mypy/test/testtypes.py::TypeOpsSuite::test_is_proper_subtype_covariance mypy/test/testtypes.py::MeetSuite::test_meet_class_types_with_shared_interfaces mypy/test/testtypes.py::TypeOpsSuite::test_is_proper_subtype_invariance mypy/test/testtypes.py::MeetSuite::test_meet_interface_and_class_types mypy/test/testtypes.py::MeetSuite::test_meet_interface_types mypy/test/testtypes.py::MeetSuite::test_none mypy/test/testtypes.py::MeetSuite::test_simple_generics mypy/test/testtypes.py::MeetSuite::test_trivial_cases mypy/test/testtypes.py::MeetSuite::test_tuples mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testStrLiteral mypy/test/testtypes.py::TypeOpsSuite::test_simplify_very_large_union mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testInOperator mypy/test/testtypes.py::TypeOpsSuite::test_subtype_aliases mypy/test/testtypes.py::TypeOpsSuite::test_trivial_erase mypy/test/testtypes.py::TypeOpsSuite::test_trivial_expand mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testUnaryBitwiseNeg mypy/test/testtypes.py::TypeOpsSuite::test_trivial_expand_recursive mypy/test/testtypes.py::TypeOpsSuite::test_true_only_of_false_type_is_uninhabited mypy/test/testtypes.py::TypeOpsSuite::test_true_only_of_instance mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testFloatLiteral mypy/test/testtypes.py::TypeOpsSuite::test_true_only_of_true_type_is_idempotent mypy/test/testtypes.py::TypeOpsSuite::test_true_only_of_union mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testNotInOperator mypy/test/testtypes.py::TypeOpsSuite::test_union_can_be_false_if_any_false mypy/test/testtypes.py::TypeOpsSuite::test_union_can_be_true_if_any_true mypy/test/testtypes.py::TypeOpsSuite::test_union_can_not_be_false_if_none_false mypy/test/testtypes.py::TypeOpsSuite::test_union_can_not_be_true_if_none_true mypy/test/testtypes.py::JoinSuite::test_any_type mypy/test/testtypes.py::JoinSuite::test_callables_with_any mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testIndexing mypy/test/testtypes.py::JoinSuite::test_class_subtyping mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testNonBooleanContainsReturnValue mypy/test/testtypes.py::JoinSuite::test_function_types mypy/test/testtypes.py::JoinSuite::test_generic_types_and_any mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testComplexLiteral mypy/test/testtypes.py::JoinSuite::test_generics_contravariant mypy/test/testtypes.py::JoinSuite::test_generics_covariant mypy/test/testtypes.py::JoinSuite::test_generics_invariant mypy/test/testtypes.py::JoinSuite::test_generics_with_inheritance mypy/test/testtypes.py::JoinSuite::test_generics_with_inheritance_and_shared_supertype mypy/test/testtypes.py::JoinSuite::test_generics_with_multiple_args mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testInWithInvalidArgs mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testIndexingAsLvalue mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testBytesLiteral mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testEq mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testYieldExpression mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testOverloadedIndexing mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testYieldExpressionWithNone mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testLtAndGt mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testUnicodeLiteralInPython3 mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testYieldFromIteratorHasNoValue mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::cmpIgnoredPy3 mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testCastExpressions mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testYieldFromGeneratorHasValue mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testAdd mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testAnyCast mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testLeAndGe mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testYieldFromTupleExpression mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testSub mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testChainedComp mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testAssertType mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testMul mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testChainedCompBoolRes mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testDictWithKeywordArgsOnly mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testAssertTypeGeneric mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testMatMul mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testChainedCompResTyp mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testNoneReturnTypeBasics mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testDictWithoutKeywordArgs mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testDiv mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testIs mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testNoneReturnTypeWithStatements mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testIsNot mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testIntDiv mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testDictFromList mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testNoneReturnTypeWithExpressions mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testIsRightOperand mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testNoneReturnTypeWithExpressions2 mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testMod mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testReverseBinaryOperator mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testDictFromIterableAndKeywordArg mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testGetSlice mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testReverseBinaryOperator2 mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testPow mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testSlicingWithInvalidBase mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testDictFromIterableAndKeywordArg2 mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testReverseBinaryOperator3 mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testSlicingWithNonindexable mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testBinaryOperatorWithAnyRightOperand mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testMiscBinaryOperators mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testNonIntSliceBounds mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testDictFromIterableAndKeywordArg3 mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testReverseComparisonOperator mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testBooleanAndOr mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testNoneSliceBounds mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testReversibleComparisonWithExtraArgument mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testRestrictedTypeAnd mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testNoneSliceBoundsWithStrictOptional mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testDictFromIterableAndStarStarArgs mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testErrorContextAndBinaryOperators mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testRestrictedTypeOr mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testTrivialLambda mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testErrorContextAndBinaryOperators2 mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testAndOr mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testDictFromIterableAndStarStarArgs2 mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testVoidLambda mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testRestrictedBoolAndOrWithGenerics mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testDivmod mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testUserDefinedClassNamedDict mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testNonBooleanOr mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testNoCrashOnLambdaGenerator mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testUnaryMinus mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testLambdaAndReachability mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testSimpleListComprehensionNestedTuples2 mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testSpecialSignatureForSubclassOfDict mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testUnaryPlus mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testListComprehensionWithNonDirectMapping mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testSimpleListComprehension mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testUnaryNot mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testSpecialSignatureForSubclassOfDict2 mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testErrorInListComprehensionCondition mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testSimpleListComprehensionNestedTuples mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testTypeInferenceOfListComprehension mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testOverridingSpecialSignatureInSubclassOfDict mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testEmptyListOverlap mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testSimpleListComprehensionInClassBody mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testRevealType mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testStrictEqualityContains mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testRevealLocals mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testSimpleSetComprehension mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testCustomEqDecoratedStrictEquality mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testUndefinedRevealType mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testCustomEqVarStrictEquality mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testUserDefinedRevealType mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testSimpleDictionaryComprehension mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testStrictEqualityUnions mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testTypingRevealType mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testStrictEqualityDisabledWithTypeVarRestrictions mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testDictionaryComprehensionWithNonDirectMapping mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testStrictEqualityBytesSpecial mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testStrictEqualityWithALiteral mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testTypingExtensionsRevealType mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testSimpleGeneratorExpression mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testRevealTypeVar mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testStrictEqualityWithALiteralNewType mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testStrictEqualityBytesSpecialUnion mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testRevealForward mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testGeneratorIncompatibleErrorMessage mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testRevealUncheckedFunction mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testSimpleConditionalExpression mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testStrictEqualityByteArraySpecial mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testRevealCheckUntypedDefs mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testConditionalExpressionWithEmptyCondition mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testStrictEqualityWithFixedLengthTupleInCheck mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testRevealTypedDef mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testConditionalExpressionWithSubtyping mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testLambdaTypedContext mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testConditionalExpressionAndTypeContext mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testLambdaUnypedContext mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testStrictEqualityNoPromotePy3 mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testLambdaCheckUnypedContext mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testConditionalExpressionUnion mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testOverlappingAnyTypeWithoutStrictOptional mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testConditionalExpressionUnionWithAny mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testEqNone mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testConditionalExpressionStatementNoReturn mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testStrictEqualityOkPromote mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testUnimportedHintAny mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testOperationsWithNonInstanceTypes mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testLtNone mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testDictWithStarExpr mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testUnimportedHintAnyLower mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testOperatorMethodWithInvalidArgCount mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testStrictEqualityAny mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testOperatorMethodAsVar mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testUnimportedHintOptional mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testDictWithStarStarExpr mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testStrictEqualityStrictOptional mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testOperatorMethodAsVar2 mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testAssertionLazilyWithIsNone mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testStrictEqualityNoStrictOptional mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testDictIncompatibleTypeErrorMessage mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testIndexedLvalueWithSubtypes mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testStrictEqualityEqNoOptionalOverlap mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testAssertionLazilyWithIsInstance mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testCustomEqCheckStrictEquality mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testDictIncompatibleKeyVerbosity mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testAssertCurrentFrameIsNotUnreachable mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testEllipsis mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testCustomEqCheckStrictEqualityOKInstance mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testTypeVarAsValue mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testDictIncompatibleValueVerbosity mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testCustomEqCheckStrictEqualityOKUnion mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testTypeCheckOverloadImplementationTypeVarDifferingUsage2 mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadNotImportedNoCrash mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testTypeAnnotationNeededMultipleAssignment mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testTypeCheckOverloadedFunctionBody mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testCustomEqCheckStrictEqualityTuple mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testTypeCheckOverloadWithImplementation mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testStrictEqualityEq mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testTypeCheckOverloadedMethodBody mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testCustomEqCheckStrictEqualityMeta mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testTypingExtensionsOverload mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testStrictEqualityIs mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testCustomContainsCheckStrictEquality mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testCallToOverloadedFunction mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadWithFunctionType mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadNeedsImplementation mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadedFunctionReturnValue mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testSingleOverloadNoImplementation mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testVarArgsOverload mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testStrictEqualityTypeVsCallable mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testCallToOverloadedMethod mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadByAnyOtherName mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testVarArgsOverload2 mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testTypeCheckOverloadWithDecoratedImplementation mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadWithTypeObject mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadedMethodReturnValue mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadDecoratedImplementationNotLast mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testStrictEqualityMetaclass mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadedInitAndTypeObjectInOverload mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadsWithDifferentArgumentCounts mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadImplementationNotLast mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadedForwardMethodAndCallingReverseMethod mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testDecoratedRedefinitionIsNotOverload mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverlappingErasedSignatures mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testGenericOverloadVariant mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverrideOverloadSwapped mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverlappingOverloadSignatures mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testTypeCheckOverloadWithImplementationError mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testContravariantOverlappingOverloadSignatures mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadedInit mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testTypeCheckOverloadWithUntypedImplAndMultipleVariants mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverrideOverloadSwappedWithExtraVariants mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testPartiallyCovariantOverlappingOverloadSignatures mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testIntersectionTypeCompatibility mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testTypeCheckOverloadWithImplTooSpecificArg mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverrideOverloadSwappedWithAdjustedVariants mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testPartiallyContravariantOverloadSignatures mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testTypeCheckOverloadWithImplTooSpecificRetType mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverrideOverloadedMethodWithMoreGeneralArgumentTypes mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testCompatibilityOfIntersectionTypeObjectWithStdType mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testCovariantOverlappingOverloadSignatures mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testTypeCheckOverloadWithImplTypeVar mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testCovariantOverlappingOverloadSignaturesWithSomeSameArgTypes mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverrideOverloadedMethodWithMoreSpecificArgumentTypes mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadedGetitem mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testTypeCheckOverloadWithImplTypeVarProblems mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testCovariantOverlappingOverloadSignaturesWithAnyType mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadingAndDucktypeCompatibility mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testContravariantOverlappingOverloadSignaturesWithAnyType mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadedGetitemWithGenerics mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testTypeCheckOverloadImplementationTypeVarWithValueRestriction mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadingAndIntFloatSubtyping mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testImplementingOverloadedMethod mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadedLtAndGtMethods mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadWithDerivedFromAny mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadWithOverlappingItemsAndAnyArgument7 mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testTypeCheckOverloadImplementationTypeVarDifferingUsage1 mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadingVariableInputs mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadWithOverlappingItemsAndAnyArgument8 mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testNonconsecutiveOverloads mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadWithBoundedTypeVar mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testTypeInferenceSpecialCaseWithOverloading mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testNonconsecutiveOverloadsMissingFirstOverload mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadWithOverlappingItemsAndAnyArgument9 mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testKeywordArgOverload mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testNonconsecutiveOverloadsMissingLaterOverload mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadedCallWithVariableTypes mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testIgnoreOverloadVariantBasedOnKeywordArg mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadWithOverlappingItemsAndAnyArgument10 mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadOverlapWithTypeVars mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadTuple mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadWithTupleVarArg mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadWithOverlappingItemsAndAnyArgument11 mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testCallableSpecificOverload mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadWithOverlappingItemsAndAnyArgument12 mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testPreferExactSignatureMatchInOverload mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testCustomRedefinitionDecorator mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadOverlapWithTypeVarsWithValues mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadWithOverlappingItemsAndAnyArgument13 mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadWithOverlappingItemsAndAnyArgument1 mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadTupleInstance mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadWithOverlappingItemsAndAnyArgument14 mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadOverlapWithTypeVarsWithValuesOrdering mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadWithOverlappingItemsAndAnyArgument2 mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadWithOverlappingItemsAndAnyArgument15 mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadWithOverlappingItemsAndAnyArgument3 mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadTupleEllipsisNumargs mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadsUsingAny mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadWithOverlappingItemsAndAnyArgument16 mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadWithOverlappingItemsAndAnyArgument4 mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadAgainstEmptyCollections mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadWithOverlappingItemsAndAnyArgument5 mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadOnOverloadWithType mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadAgainstEmptyCovariantCollections mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadWithOverlappingItemsAndAnyArgument6 mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadFlagsPossibleMatches mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverlappingOverloadCounting mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadTupleEllipsisVariance mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadPossibleOverlapWithArgsAndKwargs mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadPossibleOverlapMixingNamedArgsWithKwargs mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadWithTupleMatchingTypeVar mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadWithMethodOverrideAndImplementation mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadPossibleOverlapWithVarargs mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadPossibleOverlapMixingNamedArgsWithKwargs2 mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadPossibleOverlapWithVarargs2 mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadWithIncompatibleMethodOverrideAndImplementation mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadAnyIsConsideredValidReturnSubtype mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadPossibleOverlapWithVarargs3 mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testSingleOverloadStub mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testSingleOverload2 mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadWithNonPositionalArgs mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadWithNonPositionalArgsIgnoresOrder mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadKwargsSelectionWithDict mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadPossibleOverlapMixingNamedArgsWithKwargs3 mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadWithVariableArgsAreOverlapping mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadVarargInputAndVarargDefinition mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadDetectsPossibleMatchesWithGenerics mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadPossibleOverlapWithVarargs4 mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadKwargsSelectionWithTypedDict mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadMultipleVarargDefinition mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadVarargsAndKwargsSelection mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadPossibleOverlapWithKwargs mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadWithPartiallyOverlappingUnions mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadMultipleVarargDefinitionComplex mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadPossibleOverlapMixingNamedArgsWithVarargs mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadTypedDictDifferentRequiredKeysMeansDictsAreDisjoint mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadVarargsSelection mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadWithPartiallyOverlappingUnionsNested mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadPossibleOverlapMixingOptionalArgsWithVarargs mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadPartialOverlapWithUnrestrictedTypeVar mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadVarargsSelectionWithTuples mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadPossibleOverlapMixingOptionalArgsWithVarargs2 mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadPartialOverlapWithUnrestrictedTypeVarNested mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadedTypedDictPartiallyOverlappingRequiredKeys mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadedPartiallyOverlappingTypeVarsAndUnion mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadVarargsSelectionWithNamedTuples mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadPartialOverlapWithUnrestrictedTypeVarInClass mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadPartiallyOverlappingTypeVarsIdentical mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadedPartiallyOverlappingCallables mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadInferUnionReturnFunctionsWithKwargs mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadPartialOverlapWithUnrestrictedTypeVarInClassNested mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadNotConfusedForProperty mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadedTypedDictFullyNonTotalDictsAreAlwaysPartiallyOverlapping mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadInferUnionWithDifferingLengths mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadingInferUnionReturnWithMixedTypevars mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadInferUnionReturnBasic mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadInferUnionWithMixOfPositionalAndOptionalArgs mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadInferUnionReturnMultipleArguments mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadingInferUnionReturnWithMixedTypevarsInnerMismatch mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadingInferUnionReturnWithTypevarWithValueRestriction mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadedTotalAndNonTotalTypedDictsCanPartiallyOverlap mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadInferUnionRespectsVariance mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadingInferUnionReturnWithMixedTypevarsTighterBound mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadInferUnionIfParameterNamesAreDifferent mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadingInferUnionReturnWithFunctionTypevarReturn mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadingInferUnionReturnWithObjectTypevarReturn mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadsNoneAndTypeVarsWithNoStrictOptional mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadingInferUnionReturnWithTypevarsAndValueRestrictions mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadedTypedDictsWithSomeOptionalKeysArePartiallyOverlapping mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadingInferUnionReturnWithBadObjectTypevarReturn mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadsNoneAndTypeVarsWithStrictOptional mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadInferUnionReturnWithInconsistentTypevarNames mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadedPartiallyOverlappingInheritedTypes1 mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadsAndNoReturnNarrowTypeNoStrictOptional3 mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadsAndNoneWithoutStrictOptional mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadsAndNoReturnNarrowTypeNoStrictOptional1 mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadedPartiallyOverlappingInheritedTypes2 mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadsAndNoneWithStrictOptional mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadsAndNoReturnNarrowTypeWithStrictOptional3 mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadsAndNoReturnNarrowTypeWithStrictOptional1 mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadedPartiallyOverlappingInheritedTypes3 mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadWithGenericDescriptor mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadsAndNoReturnNarrowWhenBlacklistingSubtype mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadsAndNoReturnNarrowTypeNoStrictOptional2 mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadWithGenericDescriptorLookalike mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadFaultyClassMethodInheritance mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadsAndNoReturnNarrowWhenBlacklistingSubtype2 mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadsAndNoReturnNarrowTypeWithStrictOptional2 mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadWithClassMethods mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadClassMethodMixingInheritance mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadWithSwappedDecorators2 mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadWithNonGenericDescriptor mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadWithInconsistentClassMethods mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadClassMethodImplementation mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadFaultyStaticMethodInheritance mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadWithNonGenericDescriptorLookalike mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadWithStaticMethods mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadWithSwappedDecorators mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadStaticMethodMixingInheritance mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadWithInconsistentStaticMethods mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadAndSelfTypes mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadStaticMethodImplementation mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testSafeDunderOverlapInSubclass mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadAndClassTypes mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testManyUnionsInOverload mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testUnionMathOverloadingReturnsBestType mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testUnsafeDunderOverlapInSubclass mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOptionalIsNotAUnionIfNoStrictOverload mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadsWithNoneComingSecondAreAlwaysFlaggedInNoStrictOptional mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testNestedOverloadsNoCrash mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testUnionMathTrickyOverload1 mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadsWithNoneComingSecondIsOkInStrictOptional mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testNestedOverloadsTypeVar mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadErrorMessageManyMatches mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testNestedOverloadsTypeVarOverlap mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testUnionMathTrickyOverload2 mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadedInIter mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadConstrainedTypevarNotShadowingAny mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testTooManyUnionsException mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testDisallowUntypedDecoratorsOverload mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testNestedOverloadsMutuallyRecursive mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadBoundedTypevarNotShadowingAny mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testDisallowUntypedDecoratorsOverloadDunderCall mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadBadArgumentsInferredToAny2 mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadsIgnorePromotions mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testAnyIsOKAsFallbackInOverloads mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadBadArgumentsInferredToAny1 mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadsTypesAndUnions mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadInferringArgumentsUsingContext1 mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testVeryBrokenOverload mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadDeferredNode mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testBadOverloadProbableMatch mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testVeryBrokenOverload2 mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testLiteralSubtypeOverlap mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadTwoTypeArgs mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadTypeVsCallable mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadedToGeneric mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadWithObjectDecorator mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadWithErrorDecorator mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadIfMerging mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadIfBasic mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadIfNotMerging mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadIfSysVersion mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadIfOldStyle mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadIfElse mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadIfElse3 mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadIfElse2 mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadIfDontSkipUnrelatedOverload mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadIfSkipUnknownExecution mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadIfSplitFunctionDef mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadIfNotMergingDifferentNames mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadIfUnconditionalFuncDef mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadItemHasMoreGeneralReturnType mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadIfMixed mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadIfNestedOk mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadIfNestedFailure mypy/test/testcheck.py::TypeCheckSuite::check-overloading.test::testOverloadingWithParamSpec
mypy/test/testtypes.py::TypeOpsSuite::test_simplified_union_with_literals mypy/test/testcheck.py::TypeCheckSuite::check-expressions.test::testOverlappingClassCallables