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/09/24 17:04:31 UTC

[GitHub] [incubator-superset] serenajiang commented on a change in pull request #8284: [wip][typing] superset/models/core.py

serenajiang commented on a change in pull request #8284: [wip][typing] superset/models/core.py
URL: https://github.com/apache/incubator-superset/pull/8284#discussion_r327730279
 
 

 ##########
 File path: superset/models/core.py
 ##########
 @@ -180,14 +187,14 @@ def __repr__(self):
         return self.slice_name or str(self.id)
 
     @property
-    def cls_model(self):
+    def cls_model(self) -> Type["BaseDatasource"]:
         return ConnectorRegistry.sources[self.datasource_type]
 
     @property
-    def datasource(self):
+    def datasource(self) -> "BaseDatasource":
         return self.get_datasource
 
-    def clone(self):
+    def clone(self) -> "Slice":
 
 Review comment:
   Since this is a method of the `Slice` class, the `Slice` class hasn't been defined yet. Quotes allow us to reference it anyway for the static typechecker to do its thing.

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