Skip to content

Commit e76daeb

Browse files
authored
feat: rename SaType to SaTypeOrInstance
1 parent f5b5781 commit e76daeb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

sqlmodel/main.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
Mapping[int, Union["IncEx", bool]],
9898
Mapping[str, Union["IncEx", bool]],
9999
]
100-
SaType: TypeAlias = Union[TypeEngine[Any], Type[TypeEngine[Any]], SchemaEventTarget]
100+
SaTypeOrInstance: TypeAlias = Union[TypeEngine[Any], Type[TypeEngine[Any]], SchemaEventTarget]
101101
OnDeleteType = Literal["CASCADE", "SET NULL", "RESTRICT"]
102102

103103

@@ -247,7 +247,7 @@ def Field(
247247
unique: Union[bool, UndefinedType] = Undefined,
248248
nullable: Union[bool, UndefinedType] = Undefined,
249249
index: Union[bool, UndefinedType] = Undefined,
250-
sa_type: Union[SaType, UndefinedType] = Undefined,
250+
sa_type: Union[SaTypeOrInstance, UndefinedType] = Undefined,
251251
sa_column_args: Union[Sequence[Any], UndefinedType] = Undefined,
252252
sa_column_kwargs: Union[Mapping[str, Any], UndefinedType] = Undefined,
253253
schema_extra: Optional[Dict[str, Any]] = None,
@@ -293,7 +293,7 @@ def Field(
293293
unique: Union[bool, UndefinedType] = Undefined,
294294
nullable: Union[bool, UndefinedType] = Undefined,
295295
index: Union[bool, UndefinedType] = Undefined,
296-
sa_type: Union[SaType, UndefinedType] = Undefined,
296+
sa_type: Union[SaTypeOrInstance, UndefinedType] = Undefined,
297297
sa_column_args: Union[Sequence[Any], UndefinedType] = Undefined,
298298
sa_column_kwargs: Union[Mapping[str, Any], UndefinedType] = Undefined,
299299
schema_extra: Optional[Dict[str, Any]] = None,
@@ -382,7 +382,7 @@ def Field(
382382
unique: Union[bool, UndefinedType] = Undefined,
383383
nullable: Union[bool, UndefinedType] = Undefined,
384384
index: Union[bool, UndefinedType] = Undefined,
385-
sa_type: Union[SaType, UndefinedType] = Undefined,
385+
sa_type: Union[SaTypeOrInstance, UndefinedType] = Undefined,
386386
sa_column: Union[Column, UndefinedType] = Undefined, # type: ignore
387387
sa_column_args: Union[Sequence[Any], UndefinedType] = Undefined,
388388
sa_column_kwargs: Union[Mapping[str, Any], UndefinedType] = Undefined,

0 commit comments

Comments
 (0)