10
10
import libcst .matchers as m
11
11
from libcst .metadata import PositionProvider
12
12
13
- from .flake8triovisitor import Flake8TrioVisitor , Flake8TrioVisitor_cst
13
+ from .flake8triovisitor import Flake8AsyncVisitor , Flake8AsyncVisitor_cst
14
14
from .helpers import utility_visitor , utility_visitor_cst
15
15
16
16
if TYPE_CHECKING :
21
21
22
22
23
23
@utility_visitor
24
- class VisitorTypeTracker (Flake8TrioVisitor ):
24
+ class VisitorTypeTracker (Flake8AsyncVisitor ):
25
25
def visit_AsyncFunctionDef (
26
26
self , node : ast .AsyncFunctionDef | ast .FunctionDef | ast .Lambda
27
27
):
@@ -101,15 +101,15 @@ def visit_With(self, node: ast.With | ast.AsyncWith):
101
101
102
102
103
103
@utility_visitor
104
- class VisitorAwaitModifier (Flake8TrioVisitor ):
104
+ class VisitorAwaitModifier (Flake8AsyncVisitor ):
105
105
def visit_Await (self , node : ast .Await ):
106
106
if isinstance (node .value , ast .Call ):
107
107
# add attribute to indicate it's awaited
108
108
setattr (node .value , "awaited" , True ) # noqa: B010
109
109
110
110
111
111
@utility_visitor
112
- class VisitorLibraryHandler (Flake8TrioVisitor ):
112
+ class VisitorLibraryHandler (Flake8AsyncVisitor ):
113
113
def __init__ (self , * args : Any , ** kwargs : Any ):
114
114
super ().__init__ (* args , ** kwargs )
115
115
# check whether library we're working towards has been explicitly
@@ -126,7 +126,7 @@ def visit_Import(self, node: ast.Import):
126
126
127
127
128
128
@utility_visitor_cst
129
- class VisitorLibraryHandler_cst (Flake8TrioVisitor_cst ):
129
+ class VisitorLibraryHandler_cst (Flake8AsyncVisitor_cst ):
130
130
def __init__ (self , * args : Any , ** kwargs : Any ):
131
131
super ().__init__ (* args , ** kwargs )
132
132
# check whether library we're working towards has been explicitly
@@ -172,7 +172,7 @@ def _find_noqa(physical_line: str) -> Match[str] | None:
172
172
173
173
174
174
@utility_visitor_cst
175
- class NoqaHandler (Flake8TrioVisitor_cst ):
175
+ class NoqaHandler (Flake8AsyncVisitor_cst ):
176
176
def visit_Comment (self , node : cst .Comment ):
177
177
noqa_match = _find_noqa (node .value )
178
178
if noqa_match is None :
0 commit comments