Skip to content

pyproject.toml: sqlmodel>=0.0.25#252

Merged
boddumanohar merged 1 commit intomainfrom
fix-lint
Nov 10, 2025
Merged

pyproject.toml: sqlmodel>=0.0.25#252
boddumanohar merged 1 commit intomainfrom
fix-lint

Conversation

@boddumanohar
Copy link
Member

@boddumanohar boddumanohar commented Nov 10, 2025

fix lint: No overload variant of exec of AsyncSession matches argument type Delete

src/api/organization/role.py:160: error: No overload variant of "exec" of "AsyncSession" matches argument type "Delete"  [call-overload]
src/api/organization/role.py:160: note: Possible overload variants:
src/api/organization/role.py:160: note:     def [_TSelectParam: Any] exec(self, statement: Select[_TSelectParam], *, params: Mapping[str, Any] | Sequence[Mapping[str, Any]] | None = ..., execution_options: Mapping[str, Any] = ..., bind_arguments: dict[str, Any] | None = ..., _parent_execute_state: Any | None = ..., _add_event: Any | None = ...) -> Coroutine[Any, Any, TupleResult[_TSelectParam]]
src/api/organization/role.py:160: note:     def [_TSelectParam: Any] exec(self, statement: SelectOfScalar[_TSelectParam], *, params: Mapping[str, Any] | Sequence[Mapping[str, Any]] | None = ..., execution_options: Mapping[str, Any] = ..., bind_arguments: dict[str, Any] | None = ..., _parent_execute_state: Any | None = ..., _add_event: Any | None = ...) -> Coroutine[Any, Any, ScalarResult[_TSelectParam]]
Found 1 error in 1 file (checked 58 source files)

@mxsrc
Copy link
Collaborator

mxsrc commented Nov 10, 2025

Can you check with which version of sqlmodel you have this issue? This looks like the issue that fastapi/sqlmodel#1342 fixed, so if you are on or below 0.0.25 that might be the cause for this. If that's the case, I'd prefer adding the version requirement to the pyproject.toml instead, afaik the session.execute is deprecated.

@boddumanohar boddumanohar changed the title fix lint: No overload variant of exec of AsyncSession fix lint: set sqlmodel>=0.0.25 Nov 10, 2025
@boddumanohar
Copy link
Member Author

You are right. Updating the sqlmodel version has fixed the issue. Updated the PR title. PTAL

@boddumanohar boddumanohar changed the title fix lint: set sqlmodel>=0.0.25 pyproject.toml: sqlmodel>=0.0.25 Nov 10, 2025
Copy link
Collaborator

@mxsrc mxsrc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks!

@boddumanohar boddumanohar merged commit 17b1bb6 into main Nov 10, 2025
5 checks passed
@boddumanohar boddumanohar deleted the fix-lint branch November 10, 2025 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants