(self, expr: DictionaryComprehension)
| 6367 | expr.generator.accept(self) |
| 6368 | |
| 6369 | def visit_dictionary_comprehension(self, expr: DictionaryComprehension) -> None: |
| 6370 | if any(expr.is_async): |
| 6371 | if ( |
| 6372 | not self.is_func_scope() |
| 6373 | or not self.function_stack |
| 6374 | or not self.function_stack[-1].is_coroutine |
| 6375 | ): |
| 6376 | self.fail(message_registry.ASYNC_FOR_OUTSIDE_COROUTINE, expr, code=codes.SYNTAX) |
| 6377 | |
| 6378 | with self.enter(expr): |
| 6379 | self.analyze_comp_for(expr) |
| 6380 | expr.key.accept(self) |
| 6381 | expr.value.accept(self) |
| 6382 | self.analyze_comp_for_2(expr) |
| 6383 | |
| 6384 | def visit_generator_expr(self, expr: GeneratorExpr) -> None: |
| 6385 | with self.enter(expr): |
nothing calls this directly
no test coverage detected