@@ -1940,6 +1940,9 @@ def check_method_override_for_base_with_name(
19401940 original_class_or_static ,
19411941 override_class_or_static ,
19421942 context ,
1943+ ignore_pos_arg_names = (
1944+ not context .is_explicit_override if isinstance (context , FuncDef ) else True
1945+ ),
19431946 )
19441947 elif is_equivalent (original_type , typ ):
19451948 # Assume invariance for a non-callable attribute here. Note
@@ -2005,6 +2008,7 @@ def check_override(
20052008 original_class_or_static : bool ,
20062009 override_class_or_static : bool ,
20072010 node : Context ,
2011+ ignore_pos_arg_names : bool ,
20082012 ) -> None :
20092013 """Check a method override with given signatures.
20102014
@@ -2018,7 +2022,7 @@ def check_override(
20182022 # Use boolean variable to clarify code.
20192023 fail = False
20202024 op_method_wider_note = False
2021- if not is_subtype (override , original , ignore_pos_arg_names = True ):
2025+ if not is_subtype (override , original , ignore_pos_arg_names = ignore_pos_arg_names ):
20222026 fail = True
20232027 elif isinstance (override , Overloaded ) and self .is_forward_op_method (name ):
20242028 # Operator method overrides cannot extend the domain, as
0 commit comments