|
129 | 129 | PY_MINOR_VERSION: Final = sys.version_info[1] |
130 | 130 |
|
131 | 131 | import ast as ast3 |
132 | | - |
133 | | -# TODO: Index, ExtSlice are deprecated in 3.9. |
134 | | -from ast import AST, Attribute, Call, FunctionType, Index, Name, Starred, UAdd, UnaryOp, USub |
| 132 | +from ast import AST, Attribute, Call, FunctionType, Name, Starred, UAdd, UnaryOp, USub |
135 | 133 |
|
136 | 134 |
|
137 | 135 | def ast3_parse( |
@@ -1779,18 +1777,6 @@ def visit_Slice(self, n: ast3.Slice) -> SliceExpr: |
1779 | 1777 | e = SliceExpr(self.visit(n.lower), self.visit(n.upper), self.visit(n.step)) |
1780 | 1778 | return self.set_line(e, n) |
1781 | 1779 |
|
1782 | | - # ExtSlice(slice* dims) |
1783 | | - def visit_ExtSlice(self, n: ast3.ExtSlice) -> TupleExpr: |
1784 | | - # cast for mypyc's benefit on Python 3.9 |
1785 | | - return TupleExpr(self.translate_expr_list(cast(Any, n).dims)) |
1786 | | - |
1787 | | - # Index(expr value) |
1788 | | - def visit_Index(self, n: Index) -> Node: |
1789 | | - # cast for mypyc's benefit on Python 3.9 |
1790 | | - value = self.visit(cast(Any, n).value) |
1791 | | - assert isinstance(value, Node) |
1792 | | - return value |
1793 | | - |
1794 | 1780 | # Match(expr subject, match_case* cases) # python 3.10 and later |
1795 | 1781 | def visit_Match(self, n: Match) -> MatchStmt: |
1796 | 1782 | node = MatchStmt( |
|
0 commit comments