Skip to content

Commit 9eb4f9a

Browse files
authored
tests: fix code for tests with python 3.7 (#3335)
1 parent c024650 commit 9eb4f9a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

renku/infrastructure/repository.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
Dict,
3636
Generator,
3737
List,
38-
Literal,
3938
NamedTuple,
4039
Optional,
4140
Sequence,
@@ -53,6 +52,11 @@
5352
from renku.core import errors
5453
from renku.core.util.os import delete_dataset_file, get_absolute_path
5554

55+
try:
56+
from typing_extensions import Literal # NOTE: Required for Python 3.7 compatibility
57+
except ImportError:
58+
from typing import Literal # type: ignore
59+
5660
NULL_TREE = git.NULL_TREE
5761
_MARKER = object()
5862
GIT_IGNORE = ".gitignore"

0 commit comments

Comments
 (0)