@@ -1820,7 +1820,7 @@ def infer_type_variables(
18201820
18211821 def bind_function_type_variables (
18221822 self , fun_type : CallableType , defn : Context
1823- ) -> tuple [Sequence [TypeVarLikeType ], bool ]:
1823+ ) -> tuple [tuple [TypeVarLikeType , ... ], bool ]:
18241824 """Find the type variables of the function type and bind them in our tvar_scope"""
18251825 has_self_type = False
18261826 if fun_type .variables :
@@ -1835,7 +1835,7 @@ def bind_function_type_variables(
18351835 assert isinstance (var_expr , TypeVarLikeExpr )
18361836 binding = self .tvar_scope .bind_new (var .name , var_expr )
18371837 defs .append (binding )
1838- return defs , has_self_type
1838+ return tuple ( defs ) , has_self_type
18391839 typevars , has_self_type = self .infer_type_variables (fun_type )
18401840 # Do not define a new type variable if already defined in scope.
18411841 typevars = [
@@ -1849,7 +1849,7 @@ def bind_function_type_variables(
18491849 binding = self .tvar_scope .bind_new (name , tvar )
18501850 defs .append (binding )
18511851
1852- return defs , has_self_type
1852+ return tuple ( defs ) , has_self_type
18531853
18541854 def is_defined_type_var (self , tvar : str , context : Context ) -> bool :
18551855 tvar_node = self .lookup_qualified (tvar , context )
0 commit comments