Skip to content

Commit 871e42a

Browse files
committed
Remove TypeAlias for Python 3.9
1 parent 38230cf commit 871e42a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

devito/ir/iet/visitors.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from collections import OrderedDict
88
from collections.abc import Callable, Iterable, Iterator, Sequence
99
from itertools import chain, groupby
10-
from typing import Any, Generic, TypeAlias, TypeVar
10+
from typing import Any, Generic, TypeVar
1111
import ctypes
1212

1313
import cgen as c
@@ -1046,7 +1046,7 @@ def _defines_aliases(n):
10461046
else:
10471047
yield i
10481048

1049-
RulesDict: TypeAlias = dict[str, Callable[[Node], Iterator[Any]]]
1049+
RulesDict = dict[str, Callable[[Node], Iterator[Any]]]
10501050
rules: RulesDict = {
10511051
'symbolics': lambda n: n.functions,
10521052
'basics': lambda n: (i for i in n.expr_symbols if isinstance(i, Basic)),
@@ -1108,7 +1108,7 @@ class FindNodes(LazyVisitor[list[Node]]):
11081108
appears.
11091109
"""
11101110

1111-
RulesDict: TypeAlias = dict[str, Callable[[type, Node], bool]]
1111+
RulesDict = dict[str, Callable[[type, Node], bool]]
11121112
rules: RulesDict = {
11131113
'type': lambda match, o: isinstance(o, match),
11141114
'scope': lambda match, o: match in flatten(o.children)

0 commit comments

Comments
 (0)