Skip to content

Commit 1d23b27

Browse files
committed
use field info args without default to prevent overlapping values
1 parent df8433e commit 1d23b27

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

aredis_om/model/model.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
from pydantic._internal._model_construction import ModelMetaclass
3131
from pydantic._internal._repr import Representation
3232
from pydantic.fields import FieldInfo as PydanticFieldInfo
33-
from pydantic.fields import _FieldInfoInputs
33+
from pydantic.fields import _FromFieldInfoInputs
3434
from pydantic_core import PydanticUndefined as Undefined
3535
from pydantic_core import PydanticUndefinedType as UndefinedType
3636
from redis.commands.json.path import Path
@@ -1184,7 +1184,7 @@ def Field(
11841184
index: Union[bool, UndefinedType] = Undefined,
11851185
full_text_search: Union[bool, UndefinedType] = Undefined,
11861186
vector_options: Optional[VectorFieldOptions] = None,
1187-
**kwargs: Unpack[_FieldInfoInputs],
1187+
**kwargs: Unpack[_FromFieldInfoInputs],
11881188
) -> Any:
11891189
field_info = FieldInfo(
11901190
**kwargs,
@@ -1375,7 +1375,7 @@ def outer_type_or_annotation(field: FieldInfo):
13751375
return field.annotation.__args__[0] # type: ignore
13761376

13771377

1378-
def should_index_field(field_info: FieldInfo) -> bool:
1378+
def should_index_field(field_info: FieldInfo | PydanticFieldInfo) -> bool:
13791379
# for vector, full text search, and sortable fields, we always have to index
13801380
# We could require the user to set index=True, but that would be a breaking change
13811381
index = getattr(field_info, "index", None) is True

0 commit comments

Comments
 (0)