|
78 | 78 | Block, |
79 | 79 | BytesExpr, |
80 | 80 | CallExpr, |
| 81 | + CastExpr, |
81 | 82 | ClassDef, |
82 | 83 | ComparisonExpr, |
83 | 84 | ComplexExpr, |
| 85 | + ConditionalExpr, |
84 | 86 | Decorator, |
85 | 87 | DictExpr, |
| 88 | + DictionaryComprehension, |
86 | 89 | EllipsisExpr, |
87 | 90 | Expression, |
88 | 91 | ExpressionStmt, |
89 | 92 | FloatExpr, |
90 | 93 | FuncBase, |
91 | 94 | FuncDef, |
| 95 | + GeneratorExpr, |
92 | 96 | IfStmt, |
93 | 97 | Import, |
94 | 98 | ImportAll, |
95 | 99 | ImportFrom, |
96 | 100 | IndexExpr, |
97 | 101 | IntExpr, |
98 | 102 | LambdaExpr, |
| 103 | + ListComprehension, |
99 | 104 | ListExpr, |
100 | 105 | MemberExpr, |
101 | 106 | MypyFile, |
102 | 107 | NameExpr, |
103 | 108 | OpExpr, |
104 | 109 | OverloadedFuncDef, |
| 110 | + SetComprehension, |
105 | 111 | SetExpr, |
106 | 112 | SliceExpr, |
107 | 113 | StarExpr, |
@@ -396,14 +402,26 @@ def _visit_unsupported_expr(self, o: object) -> str: |
396 | 402 | # Something we do not understand. |
397 | 403 | return self.stubgen.add_name("_typeshed.Incomplete") |
398 | 404 |
|
399 | | - visit_comparison_expr = _visit_unsupported_expr |
400 | | - visit_cast_expr = _visit_unsupported_expr |
401 | | - visit_conditional_expr = _visit_unsupported_expr |
| 405 | + def visit_comparison_expr(self, o: ComparisonExpr) -> str: |
| 406 | + return self._visit_unsupported_expr(o) |
402 | 407 |
|
403 | | - visit_list_comprehension = _visit_unsupported_expr |
404 | | - visit_set_comprehension = _visit_unsupported_expr |
405 | | - visit_dictionary_comprehension = _visit_unsupported_expr |
406 | | - visit_generator_expr = _visit_unsupported_expr |
| 408 | + def visit_cast_expr(self, o: CastExpr) -> str: |
| 409 | + return self._visit_unsupported_expr(o) |
| 410 | + |
| 411 | + def visit_conditional_expr(self, o: ConditionalExpr) -> str: |
| 412 | + return self._visit_unsupported_expr(o) |
| 413 | + |
| 414 | + def visit_list_comprehension(self, o: ListComprehension) -> str: |
| 415 | + return self._visit_unsupported_expr(o) |
| 416 | + |
| 417 | + def visit_set_comprehension(self, o: SetComprehension) -> str: |
| 418 | + return self._visit_unsupported_expr(o) |
| 419 | + |
| 420 | + def visit_dictionary_comprehension(self, o: DictionaryComprehension) -> str: |
| 421 | + return self._visit_unsupported_expr(o) |
| 422 | + |
| 423 | + def visit_generator_expr(self, o: GeneratorExpr) -> str: |
| 424 | + return self._visit_unsupported_expr(o) |
407 | 425 |
|
408 | 426 |
|
409 | 427 | def find_defined_names(file: MypyFile) -> set[str]: |
|
0 commit comments