@@ -182,11 +182,7 @@ def add_error(
182182 )
183183
184184 def check_min_version (
185- self ,
186- feature : str ,
187- min_version : tuple [int , int ],
188- line : int ,
189- column : int ,
185+ self , feature : str , min_version : tuple [int , int ], line : int , column : int
190186 ) -> None :
191187 """Report a non blocker syntax error if the target Python feature is older than min_version."""
192188 if self .is_stub :
@@ -709,9 +705,7 @@ def read_func_def(state: State, data: ReadBuffer) -> FuncDef:
709705 func_def .is_coroutine = True
710706 read_loc (data , func_def )
711707 if type_params :
712- state .check_min_version (
713- "Type parameter lists" , (3 , 12 ), func_def .line , func_def .column
714- )
708+ state .check_min_version ("Type parameter lists" , (3 , 12 ), func_def .line , func_def .column )
715709 check_type_param_defaults (state , type_params , func_def .line , func_def .column )
716710 if typ :
717711 typ .line = func_def .line
@@ -761,9 +755,7 @@ def read_class_def(state: State, data: ReadBuffer) -> ClassDef:
761755 class_def .decorators = decorators
762756 read_loc (data , class_def )
763757 if type_params :
764- state .check_min_version (
765- "Type parameter lists" , (3 , 12 ), class_def .line , class_def .column
766- )
758+ state .check_min_version ("Type parameter lists" , (3 , 12 ), class_def .line , class_def .column )
767759 check_type_param_defaults (state , type_params , class_def .line , class_def .column )
768760 expect_end_tag (data )
769761 return class_def
@@ -819,9 +811,7 @@ def read_type_alias_stmt(state: State, data: ReadBuffer) -> TypeAliasStmt:
819811
820812 stmt = TypeAliasStmt (name , type_params , lambda_expr )
821813 read_loc (data , stmt )
822- state .check_min_version (
823- '"type" statements' , (3 , 12 ), stmt .line , stmt .column
824- )
814+ state .check_min_version ('"type" statements' , (3 , 12 ), stmt .line , stmt .column )
825815 check_type_param_defaults (state , type_params , stmt .line , stmt .column )
826816 expect_end_tag (data )
827817 return stmt
0 commit comments