dpgaspar commented on a change in pull request #9418: [mypy] Enforcing typing 
for superset.dashboards
URL: 
https://github.com/apache/incubator-superset/pull/9418#discussion_r400328340
 
 

 ##########
 File path: superset/dashboards/commands/bulk_delete.py
 ##########
 @@ -40,7 +40,7 @@ def __init__(self, user: User, model_ids: List[int]):
         self._model_ids = model_ids
         self._models: Optional[List[Dashboard]] = None
 
-    def run(self):
+    def run(self) -> None:
 
 Review comment:
   My take is that the abstract is defined has `Optional[Model]` and the 
implementations can return `None` or `Model`. If we set (for example) 
`create.run` -> Optional[Model]` then I should check for the model's existence 
on the return from: 
https://github.com/apache/incubator-superset/blob/master/superset/dashboards/api.py#L164.
 
   
   And I'm assuming that the commands succeed and return or raise. What do you 
think? 

----------------------------------------------------------------
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