@@ -90,7 +90,7 @@ def get_async_function(self) -> Callable[FunctionParams, Coroutine[Any, Any, Ret
9090 original_function = self .function
9191
9292 class ConvertSyncFunctionToAsync (NodeTransformer ):
93- def visit_FunctionDef (self , node : FunctionDef ) -> Union [FunctionDef , AsyncFunctionDef ]: # noqa: N802
93+ def visit_FunctionDef (self , node : FunctionDef ) -> Union [FunctionDef , AsyncFunctionDef ]:
9494 if node .name == original_function .__name__ :
9595 return AsyncFunctionDef ( # type: ignore[no-any-return, call-overload, unused-ignore]
9696 name = original_function .__name__ ,
@@ -105,7 +105,7 @@ def visit_FunctionDef(self, node: FunctionDef) -> Union[FunctionDef, AsyncFuncti
105105 return node
106106
107107 class ExtractAwaitExpressions (NodeTransformer ):
108- def visit_Call (self , node : Call ) -> Union [Call , Await ]: # noqa: N802
108+ def visit_Call (self , node : Call ) -> Union [Call , Await ]:
109109 if isinstance (node .func , Name ) and node .func .id == 'await_it' :
110110 if len (node .args ) != 1 or node .keywords :
111111 raise WrongMarkerSyntaxError ('The "await_it" marker can be used with only one positional argument.' )
@@ -132,7 +132,7 @@ def visit_Call(self, node: Call) -> Union[Call, Await]: # noqa: N802
132132
133133 def get_generator_function (self ) -> Callable [FunctionParams , Generator [ReturnType , None , None ]]:
134134 class ConvertYieldFroms (NodeTransformer ):
135- def visit_Call (self , node : Call ) -> Optional [Union [AST , List [AST ]]]: # noqa: N802
135+ def visit_Call (self , node : Call ) -> Optional [Union [AST , List [AST ]]]:
136136 if isinstance (node .func , Name ) and node .func .id == 'yield_from_it' :
137137 if len (node .args ) != 1 or node .keywords :
138138 raise WrongMarkerSyntaxError ('The "yield_from_it" marker can be used with only one positional argument.' )
@@ -168,7 +168,7 @@ def extract_context(self, context_name: str, addictional_transformers: Optional[
168168 check_decorators = self .check_decorators
169169
170170 class RewriteContexts (NodeTransformer ):
171- def visit_With (self , node : With ) -> Optional [Union [AST , List [AST ]]]: # noqa: N802
171+ def visit_With (self , node : With ) -> Optional [Union [AST , List [AST ]]]:
172172 if len (node .items ) == 1 :
173173 if isinstance (node .items [0 ].context_expr , Name ):
174174 context_expr = node .items [0 ].context_expr
@@ -182,7 +182,7 @@ def visit_With(self, node: With) -> Optional[Union[AST, List[AST]]]: # noqa: N8
182182 return node
183183
184184 class DeleteDecorator (NodeTransformer ):
185- def visit_FunctionDef (self , node : FunctionDef ) -> Optional [Union [AST , List [AST ]]]: # noqa: N802
185+ def visit_FunctionDef (self , node : FunctionDef ) -> Optional [Union [AST , List [AST ]]]:
186186 if node .name == original_function .__name__ :
187187 nonlocal transfunction_decorator
188188 transfunction_decorator = None
0 commit comments