Skip to content

Commit

Permalink
added support for literal python 3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
mpvanderschelling committed Nov 10, 2023
1 parent 080c405 commit 76766f8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
8 changes: 7 additions & 1 deletion src/f3dasm/_src/design/domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,15 @@
# Standard
import math
import pickle
import sys
from dataclasses import dataclass, field
from pathlib import Path
from typing import Any, Dict, Iterable, Iterator, List, Literal, Sequence, Type
from typing import Any, Dict, Iterable, Iterator, List, Sequence, Type

if sys.version_info < (3, 8): # NOQA
from typing_extensions import Literal # NOQA
else:
from typing import Literal

# Third-party core
import numpy as np
Expand Down
10 changes: 8 additions & 2 deletions src/f3dasm/_src/experimentdata/experimentdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,18 @@

from __future__ import annotations

import sys
# Standard
import traceback
from functools import wraps
from pathlib import Path
from typing import (Any, Callable, Dict, Iterable, Iterator, List, Literal,
Optional, Tuple, Type)
from typing import (Any, Callable, Dict, Iterable, Iterator, List, Optional,
Tuple, Type)

if sys.version_info < (3, 8): # NOQA
from typing_extensions import Literal # NOQA
else:
from typing import Literal

# Third-party
import numpy as np
Expand Down

0 comments on commit 76766f8

Please sign in to comment.