Skip to content

Commit 1ccefb8

Browse files
authored
Allow bool or string for relationship(passive_deletes=...) arg (#143)
The relationship(passive_deletes=...) can be either a boolean or a string: https://docs.sqlalchemy.org/en/13/orm/relationship_api.html#sqlalchemy.orm.relationship.params.passive_deletes
1 parent 55470ce commit 1ccefb8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sqlalchemy-stubs/orm/relationships.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class RelationshipProperty(StrategizedProperty, Generic[_T_co]):
3131
lazy: Any = ...
3232
single_parent: bool = ...
3333
collection_class: Any = ...
34-
passive_deletes: bool = ...
34+
passive_deletes: Union[bool, str] = ...
3535
cascade_backrefs: bool = ...
3636
passive_updates: bool = ...
3737
remote_side: Any = ...
@@ -61,7 +61,7 @@ class RelationshipProperty(StrategizedProperty, Generic[_T_co]):
6161
back_populates: Optional[Any] = ..., post_update: bool = ..., cascade: Union[str, bool] = ...,
6262
extension: Optional[Any] = ..., viewonly: bool = ...,
6363
lazy: Optional[Union[str, bool]] = ..., collection_class: Optional[Any] = ...,
64-
passive_deletes: bool = ..., passive_updates: bool = ...,
64+
passive_deletes: Union[bool, str] = ..., passive_updates: bool = ...,
6565
remote_side: Optional[Any] = ..., enable_typechecks: bool = ...,
6666
join_depth: Optional[Any] = ..., comparator_factory: Optional[Any] = ...,
6767
single_parent: bool = ..., innerjoin: bool = ..., distinct_target_key: Optional[Any] = ...,

0 commit comments

Comments
 (0)