Skip to content

Commit

Permalink
Make the import of typing.Literal portable between python versions …
Browse files Browse the repository at this point in the history
…3.7 and 3.12 (#1700)

Addresses this problem: https://stackoverflow.com/a/67193166

This would be useful if we want to use this library to compare graphs in
the unit tests.
  • Loading branch information
pratyai authored Nov 8, 2024
1 parent d295a62 commit fb7f56c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion dace/cli/sdfg_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@
import os
import platform
import tempfile
from typing import Dict, Literal, Set, Tuple, Union
from typing import Dict, Set, Tuple, Union
try:
from typing import Literal
except ImportError:
from typing_extensions import Literal

import dace
from dace import memlet as mlt
Expand Down

0 comments on commit fb7f56c

Please sign in to comment.