Skip to content

Commit 586ae19

Browse files
authored
Fix type of synchronize_session in update and delete methods (#76)
Currently, it's annotated as a str. Nevertheless, the argument can also be a bool. See parts in doc for update and delete: https://docs.sqlalchemy.org/en/14/orm/query.html#sqlalchemy.orm.Query
1 parent 7c8ac17 commit 586ae19

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sqlalchemy-stubs/orm/query.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,11 +167,11 @@ class Query(
167167
def merge_result(self, iterator: Any, load: bool = ...) -> Any: ...
168168
def exists(self) -> Exists: ...
169169
def count(self) -> int: ...
170-
def delete(self, synchronize_session: str = ...) -> int: ...
170+
def delete(self, synchronize_session: Union[str, bool] = ...) -> int: ...
171171
def update(
172172
self,
173173
values: Any,
174-
synchronize_session: str = ...,
174+
synchronize_session: Union[str, bool] = ...,
175175
update_args: Optional[Any] = ...,
176176
) -> int: ...
177177

0 commit comments

Comments
 (0)