betodealmeida commented on code in PR #23414:
URL: https://github.com/apache/superset/pull/23414#discussion_r1144129733
##########
superset/charts/commands/delete.py:
##########
@@ -45,8 +45,13 @@ def __init__(self, model_id: int):
def run(self) -> Model:
self.validate()
+ self._model = cast(Slice, self._model)
Review Comment:
It's needed to make the type checker happy.
On `__init__` `self._model` will be set to `None`. When we call
`self.validate()` it will either set `self._model` to a `Slice` or raise an
exception, so here we're telling the type checker that we know `self._model` is
not of type `Slice`.
--
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]