Skip to content

Commit

Permalink
Fix annotation import in Python 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
frthjf committed May 24, 2024
1 parent b387a94 commit 6370d2b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/machinable/config.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__all__ = ["to_dict"]
from typing import TYPE_CHECKING, Annotated, Any, Optional, Tuple, Union
from typing import TYPE_CHECKING, Any, Optional, Tuple, Union

import collections
import re
Expand Down
9 changes: 8 additions & 1 deletion tests/test_element.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
from typing import Annotated, Optional
from typing import Optional

import sys

if sys.version_info <= (3, 8):
from typing import Annotated
else:
from typing_extensions import Annotated

from uuid import uuid4

Expand Down

0 comments on commit 6370d2b

Please sign in to comment.