Skip to content

Commit

Permalink
Fix AsyncSession.exec return type
Browse files Browse the repository at this point in the history
  • Loading branch information
Bobronium committed Oct 12, 2023
1 parent 30c5a4c commit f83088c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sqlmodel/ext/asyncio/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ async def exec(
execution_options: Mapping[Any, Any] = util.EMPTY_DICT,
bind_arguments: Optional[Mapping[str, Any]] = None,
**kw: Any,
) -> ScalarResult[_TSelectParam]:
) -> Union[Result[_TSelectParam], ScalarResult[_TSelectParam]]:
# TODO: the documentation says execution_options accepts a dict, but only
# util.immutabledict has the union() method. Is this a bug in SQLAlchemy?
execution_options = execution_options.union({"prebuffer_rows": True}) # type: ignore
Expand Down

0 comments on commit f83088c

Please sign in to comment.