Skip to content

Commit b5c9e39

Browse files
committed
Improved typing [skip ci]
1 parent 4a10b35 commit b5c9e39

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

tests/test_sqlmodel.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import pytest
44
from sqlalchemy.exc import StatementError
55
from sqlmodel import Field, Index, Session, SQLModel, create_engine, delete, select, text
6-
from typing import Any, Optional
6+
from typing import Any
77

88
engine = create_engine('postgresql+psycopg2://localhost/pgvector_python_test')
99
with Session(engine) as session:
@@ -13,11 +13,11 @@
1313
class Item(SQLModel, table=True):
1414
__tablename__ = 'sqlmodel_item' # type: ignore
1515

16-
id: Optional[int] = Field(default=None, primary_key=True)
17-
embedding: Optional[Any] = Field(default=None, sa_type=VECTOR(3)) # type: ignore
18-
half_embedding: Optional[Any] = Field(default=None, sa_type=HALFVEC(3)) # type: ignore
19-
binary_embedding: Optional[Any] = Field(default=None, sa_type=BIT(3)) # type: ignore
20-
sparse_embedding: Optional[Any] = Field(default=None, sa_type=SPARSEVEC(3)) # type: ignore
16+
id: int | None = Field(default=None, primary_key=True)
17+
embedding: Any = Field(default=None, sa_type=VECTOR(3)) # type: ignore
18+
half_embedding: Any = Field(default=None, sa_type=HALFVEC(3)) # type: ignore
19+
binary_embedding: Any = Field(default=None, sa_type=BIT(3)) # type: ignore
20+
sparse_embedding: Any = Field(default=None, sa_type=SPARSEVEC(3)) # type: ignore
2121

2222

2323
SQLModel.metadata.drop_all(engine)

0 commit comments

Comments
 (0)