Skip to content

Commit 06b5200

Browse files
committed
Fix [no-any-return]
1 parent 7525eb9 commit 06b5200

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

sqlmodel/sql/sqltypes.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919

2020
BaseModelType = TypeVar("BaseModelType", bound=BaseModel)
2121

22+
# Define a type alias for JSON-serializable values
23+
JSONValue = Union[Dict[str, Any], List[Any], str, int, float, bool, None]
24+
2225

2326
class AutoString(types.TypeDecorator): # type: ignore
2427
impl = types.String
@@ -51,9 +54,7 @@ def __init__(
5154
super().__init__(*args, **kwargs)
5255
self.model_class = model_class # Pydantic model class to use
5356

54-
def process_bind_param(
55-
self, value: Any, dialect: Any
56-
) -> Optional[Union[Dict[str, Any], List[Dict[str, Any]]]]: # noqa: ANN401, ARG002, ANN001
57+
def process_bind_param(self, value: Any, dialect: Any) -> JSONValue: # noqa: ANN401, ARG002, ANN001
5758
if value is None:
5859
return None
5960
if isinstance(value, BaseModel):

0 commit comments

Comments
 (0)