villebro commented on a change in pull request #9411: [mypy] Enforcing typing 
for superset.charts
URL: 
https://github.com/apache/incubator-superset/pull/9411#discussion_r399832298
 
 

 ##########
 File path: superset/charts/dao.py
 ##########
 @@ -32,13 +32,14 @@ class ChartDAO(BaseDAO):
     base_filter = ChartFilter
 
     @staticmethod
-    def bulk_delete(models: List[Slice], commit=True):
-        item_ids = [model.id for model in models]
+    def bulk_delete(models: Optional[List[Slice]], commit: bool = True) -> 
None:
+        item_ids = [model.id for model in models] if models else []
 
 Review comment:
   Nice catch 👍 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to