You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "Antonio-RiveroMartnez (via GitHub)" <gi...@apache.org> on 2023/04/13 16:21:01 UTC
[GitHub] [superset] Antonio-RiveroMartnez commented on a diff in pull request #23191: fix(dataset): Respect columns configuration when duplicating datasets
Antonio-RiveroMartnez commented on code in PR #23191:
URL: https://github.com/apache/superset/pull/23191#discussion_r1165766333
##########
superset/datasets/commands/duplicate.py:
##########
@@ -44,27 +43,19 @@
class DuplicateDatasetCommand(CreateMixin, BaseCommand):
def __init__(self, data: Dict[str, Any]) -> None:
- self._base_model: SqlaTable = SqlaTable()
+ self._base_model: Optional[SqlaTable] = None
self._properties = data.copy()
+ self._database: Optional[Database] = None
def run(self) -> Model:
self.validate()
+ assert self._database is not None
Review Comment:
Trying to be explicit about the fact that both (self._database and self._base_model) are not None moving forward. Also to help us removing the bunch of type check ignores we had before.
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org