Skip to content

Commit 9bbdcd8

Browse files
committed
Revert import of Literal
1 parent 8e2c4b0 commit 9bbdcd8

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

sqlmodel/_compat.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import sys
21
import types
32
from contextlib import contextmanager
43
from contextvars import ContextVar
@@ -22,7 +21,7 @@
2221
from pydantic import VERSION as P_VERSION
2322
from pydantic import BaseModel
2423
from pydantic.fields import FieldInfo
25-
from typing_extensions import Annotated, get_args, get_origin
24+
from typing_extensions import Annotated, Literal, get_args, get_origin
2625

2726
# Reassign variable to make it reexported for mypy
2827
PYDANTIC_VERSION = P_VERSION
@@ -63,12 +62,6 @@ def _is_union_type(t: Any) -> bool:
6362
return t is UnionType or t is Union
6463

6564

66-
if sys.version_info >= (3, 9):
67-
from typing import Literal
68-
else:
69-
from typing_extensions import Literal
70-
71-
7265
finish_init: ContextVar[bool] = ContextVar("finish_init", default=True)
7366

7467

0 commit comments

Comments
 (0)