You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2019/12/12 18:38:27 UTC
[GitHub] [incubator-superset] suddjian commented on a change in pull request
#8820: Refactor Dashboard and Slice models
suddjian commented on a change in pull request #8820: Refactor Dashboard and Slice models
URL: https://github.com/apache/incubator-superset/pull/8820#discussion_r357305849
##########
File path: superset/examples/helpers.py
##########
@@ -25,13 +25,14 @@
from superset import app, db
from superset.connectors.connector_registry import ConnectorRegistry
from superset.models import core as models
+from superset.models.dashboard import Dashboard
+from superset.models.slice import Slice
BASE_URL = "https://github.com/apache-superset/examples-data/blob/master/"
# Shortcuts
DB = models.Database
-Slice = models.Slice
-Dash = models.Dashboard
+Dash = Dashboard
Review comment:
Good idea, it makes the PR a little more involved because a bunch of things import those models from this helpers file, but getting rid of that weird indirection really just makes it more worth IMO.
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org