john-bodley commented on code in PR #24466:
URL: https://github.com/apache/superset/pull/24466#discussion_r1237354231
##########
superset/daos/base.py:
##########
@@ -179,26 +183,33 @@ def update(cls, model: T, properties: dict[str, Any],
commit: bool = True) -> T:
raise DAOUpdateFailedError(exception=ex) from ex
return model
+ @overload
+ @classmethod
+ def delete(cls, objects: list[T], commit: bool = True) -> None:
+ ...
+
+ @overload
+ @classmethod
+ def delete(cls, objects: T, commit: bool = True) -> None:
+ ...
+
@classmethod
- def delete(cls, model: T, commit: bool = True) -> T:
+ def delete(cls, objects: T | list[T], commit: bool = True) -> None:
Review Comment:
`items` seems to be a more accurate/consistent than `models`, i.e., we're
deleting database items/instances as opposed to models.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]