7
7
ForStmt , ReturnStmt , AssertStmt , DelStmt , IfStmt , RaiseStmt ,
8
8
TryStmt , WithStmt , MemberExpr , OpExpr , SliceExpr , CastExpr , RevealTypeExpr ,
9
9
UnaryExpr , ListExpr , TupleExpr , DictExpr , SetExpr , IndexExpr ,
10
- GeneratorExpr , ListComprehension , ConditionalExpr , TypeApplication ,
10
+ GeneratorExpr , ListComprehension , SetComprehension , DictionaryComprehension ,
11
+ ConditionalExpr , TypeApplication , ExecStmt , Import , ImportFrom ,
11
12
LambdaExpr , ComparisonExpr , OverloadedFuncDef , YieldFromExpr ,
12
- YieldExpr , StarExpr , BackquoteExpr , AwaitExpr
13
+ YieldExpr , StarExpr , BackquoteExpr , AwaitExpr , PrintStmt ,
13
14
)
14
15
15
16
@@ -211,9 +212,22 @@ def visit_generator_expr(self, o: GeneratorExpr) -> None:
211
212
cond .accept (self )
212
213
o .left_expr .accept (self )
213
214
215
+ def visit_dictionary_comprehension (self , o : DictionaryComprehension ) -> None :
216
+ for index , sequence , conditions in zip (o .indices , o .sequences ,
217
+ o .condlists ):
218
+ sequence .accept (self )
219
+ index .accept (self )
220
+ for cond in conditions :
221
+ cond .accept (self )
222
+ o .key .accept (self )
223
+ o .value .accept (self )
224
+
214
225
def visit_list_comprehension (self , o : ListComprehension ) -> None :
215
226
o .generator .accept (self )
216
227
228
+ def visit_set_comprehension (self , o : SetComprehension ) -> None :
229
+ o .generator .accept (self )
230
+
217
231
def visit_conditional_expr (self , o : ConditionalExpr ) -> None :
218
232
o .cond .accept (self )
219
233
o .if_expr .accept (self )
@@ -233,3 +247,18 @@ def visit_backquote_expr(self, o: BackquoteExpr) -> None:
233
247
234
248
def visit_await_expr (self , o : AwaitExpr ) -> None :
235
249
o .expr .accept (self )
250
+
251
+ def visit_import (self , o : Import ) -> None :
252
+ for a in o .assignments :
253
+ a .accept (self )
254
+
255
+ def visit_import_from (self , o : ImportFrom ) -> None :
256
+ for a in o .assignments :
257
+ a .accept (self )
258
+
259
+ def visit_print_stmt (self , o : PrintStmt ) -> None :
260
+ for arg in o .args :
261
+ arg .accept (self )
262
+
263
+ def visit_exec_stmt (self , o : ExecStmt ) -> None :
264
+ o .expr .accept (self )
0 commit comments