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/25 17:59:06 UTC

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

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

 ##########
 File path: superset/models/core.py
 ##########
 @@ -457,28 +467,28 @@ def url(self):
                         )
                 except Exception:
                     pass
-        return "/superset/dashboard/{}/".format(self.slug or self.id)
+        return f"/superset/dashboard/{self.slug or self.id}/"
 
     @property
-    def datasources(self):
+    def datasources(self) -> Set[Optional["BaseDatasource"]]:
         return {slc.datasource for slc in self.slices}
 
     @property
-    def charts(self):
+    def charts(self) -> List[Optional["BaseDatasource"]]:
         return [slc.chart for slc in self.slices]
 
     @property
-    def sqla_metadata(self):
+    def sqla_metadata(self) -> None:
         # pylint: disable=no-member
         metadata = MetaData(bind=self.get_sqla_engine())
         return metadata.reflect()
 
 Review comment:
   I agree, just remove `return` as it's not really a "returner" method.

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