We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cd7546c commit 14060abCopy full SHA for 14060ab
1 file changed
tests/test_main.py
@@ -1,4 +1,4 @@
1
-from typing import Annotated, Literal, Union
+from typing import Annotated, Literal
2
3
import pytest
4
from sqlalchemy import text
@@ -332,7 +332,7 @@ def test_literal_optional_and_union_constraints(clear_sqlmodel):
332
class Model(SQLModel, table=True):
333
id: int | None = Field(default=None, primary_key=True)
334
opt_str: Literal["x", "y"] | None = None
335
- union_int: Union[Literal[10, 20], None] = None
+ union_int: Literal[10, 20] | None = None
336
337
engine = create_engine("sqlite://")
338
SQLModel.metadata.create_all(engine)
0 commit comments