From 363ddaf84138956a1473777aef98f04b0b913870 Mon Sep 17 00:00:00 2001 From: AlanBogarin Date: Sat, 23 Nov 2024 21:27:36 -0300 Subject: [PATCH 1/2] Update main.py Add type hint for sa_column (Column[Unknown]) --- sqlmodel/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sqlmodel/main.py b/sqlmodel/main.py index 3532e81a8e..53a2636515 100644 --- a/sqlmodel/main.py +++ b/sqlmodel/main.py @@ -383,7 +383,7 @@ def Field( nullable: Union[bool, UndefinedType] = Undefined, index: Union[bool, UndefinedType] = Undefined, sa_type: Union[Type[Any], UndefinedType] = Undefined, - sa_column: Union[Column, UndefinedType] = Undefined, # type: ignore + sa_column: Union[Column[Any], UndefinedType] = Undefined, # type: ignore sa_column_args: Union[Sequence[Any], UndefinedType] = Undefined, sa_column_kwargs: Union[Mapping[str, Any], UndefinedType] = Undefined, schema_extra: Optional[Dict[str, Any]] = None, From 1310bc6577b50369795df252dc5c74d15de27729 Mon Sep 17 00:00:00 2001 From: AlanBogarin Date: Tue, 26 Nov 2024 00:08:57 -0300 Subject: [PATCH 2/2] Update main.py remove type ignore flag --- sqlmodel/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sqlmodel/main.py b/sqlmodel/main.py index 53a2636515..1c794275c8 100644 --- a/sqlmodel/main.py +++ b/sqlmodel/main.py @@ -383,7 +383,7 @@ def Field( nullable: Union[bool, UndefinedType] = Undefined, index: Union[bool, UndefinedType] = Undefined, sa_type: Union[Type[Any], UndefinedType] = Undefined, - sa_column: Union[Column[Any], UndefinedType] = Undefined, # type: ignore + sa_column: Union[Column[Any], UndefinedType] = Undefined, sa_column_args: Union[Sequence[Any], UndefinedType] = Undefined, sa_column_kwargs: Union[Mapping[str, Any], UndefinedType] = Undefined, schema_extra: Optional[Dict[str, Any]] = None,