|
7 | 7 | from collections import OrderedDict |
8 | 8 | from collections.abc import Callable, Iterable, Iterator, Sequence |
9 | 9 | from itertools import chain, groupby |
10 | | -from typing import Any, Generic, TypeAlias, TypeVar |
| 10 | +from typing import Any, Generic, TypeVar |
11 | 11 | import ctypes |
12 | 12 |
|
13 | 13 | import cgen as c |
@@ -1046,7 +1046,7 @@ def _defines_aliases(n): |
1046 | 1046 | else: |
1047 | 1047 | yield i |
1048 | 1048 |
|
1049 | | - RulesDict: TypeAlias = dict[str, Callable[[Node], Iterator[Any]]] |
| 1049 | + RulesDict = dict[str, Callable[[Node], Iterator[Any]]] |
1050 | 1050 | rules: RulesDict = { |
1051 | 1051 | 'symbolics': lambda n: n.functions, |
1052 | 1052 | 'basics': lambda n: (i for i in n.expr_symbols if isinstance(i, Basic)), |
@@ -1108,7 +1108,7 @@ class FindNodes(LazyVisitor[list[Node]]): |
1108 | 1108 | appears. |
1109 | 1109 | """ |
1110 | 1110 |
|
1111 | | - RulesDict: TypeAlias = dict[str, Callable[[type, Node], bool]] |
| 1111 | + RulesDict = dict[str, Callable[[type, Node], bool]] |
1112 | 1112 | rules: RulesDict = { |
1113 | 1113 | 'type': lambda match, o: isinstance(o, match), |
1114 | 1114 | 'scope': lambda match, o: match in flatten(o.children) |
|
0 commit comments