@@ -330,13 +330,12 @@ def analyze_instance_member_access(
330
330
signature = method .type
331
331
signature = freshen_all_functions_type_vars (signature )
332
332
if not method .is_static :
333
- if name != "__call__" :
334
- # TODO: use proper treatment of special methods on unions instead
335
- # of this hack here and below (i.e. mx.self_type).
336
- dispatched_type = meet .meet_types (mx .original_type , typ )
337
- signature = check_self_arg (
338
- signature , dispatched_type , method .is_class , mx .context , name , mx .msg
339
- )
333
+ # TODO: use proper treatment of special methods on unions instead
334
+ # of this hack here and below (i.e. mx.self_type).
335
+ dispatched_type = meet .meet_types (mx .original_type , typ )
336
+ signature = check_self_arg (
337
+ signature , dispatched_type , method .is_class , mx .context , name , mx .msg
338
+ )
340
339
signature = bind_self (signature , mx .self_type , is_classmethod = method .is_class )
341
340
# TODO: should we skip these steps for static methods as well?
342
341
# Since generic static methods should not be allowed.
@@ -898,7 +897,7 @@ def f(self: S) -> T: ...
898
897
selfarg = get_proper_type (item .arg_types [0 ])
899
898
if subtypes .is_subtype (dispatched_arg_type , erase_typevars (erase_to_bound (selfarg ))):
900
899
new_items .append (item )
901
- elif isinstance (selfarg , ParamSpecType ):
900
+ elif isinstance (selfarg , ( ParamSpecType , TupleType ) ):
902
901
# TODO: This is not always right. What's the most reasonable thing to do here?
903
902
new_items .append (item )
904
903
elif isinstance (selfarg , TypeVarTupleType ):
0 commit comments