diff --git a/mypy/checker.py b/mypy/checker.py index b2c4f2263262..31402bf48f33 100644 --- a/mypy/checker.py +++ b/mypy/checker.py @@ -2155,7 +2155,7 @@ def check_method_override_for_base_with_name( and original_node and codes.MUTABLE_OVERRIDE in self.options.enabled_error_codes and self.is_writable_attribute(original_node) - and not is_subtype(original_type, typ, ignore_pos_arg_names=True) + and not is_subtype(original_type, typ) ): base_str, override_str = format_type_distinctly( original_type, typ, options=self.options @@ -2166,8 +2166,7 @@ def check_method_override_for_base_with_name( ) self.fail(msg, context) elif isinstance(original_type, UnionType) and any( - is_subtype(typ, orig_typ, ignore_pos_arg_names=True) - for orig_typ in original_type.items + is_subtype(typ, orig_typ) for orig_typ in original_type.items ): # This method is a subtype of at least one union variant. if ( @@ -2293,7 +2292,7 @@ def check_override( # Use boolean variable to clarify code. fail = False op_method_wider_note = False - if not is_subtype(override, original, ignore_pos_arg_names=True): + if not is_subtype(override, original): fail = True elif isinstance(override, Overloaded) and self.is_forward_op_method(name): # Operator method overrides cannot extend the domain, as