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 2020/07/07 03:07:23 UTC

[GitHub] [incubator-superset] villebro commented on a change in pull request #10248: chore: Cleaning up types and names for SQLA models

villebro commented on a change in pull request #10248:
URL: https://github.com/apache/incubator-superset/pull/10248#discussion_r450586438



##########
File path: superset/connectors/sqla/models.py
##########
@@ -780,8 +780,10 @@ def get_sqla_query(  # pylint: disable=too-many-arguments,too-many-locals,too-ma
         # Database spec supports join-free timeslot grouping
         time_groupby_inline = db_engine_spec.time_groupby_inline
 
-        cols: Dict[str, Column] = {col.column_name: col for col in self.columns}
-        metrics_dict: Dict[str, SqlMetric] = {m.metric_name: m for m in self.metrics}
+        columns_by_name: Dict[str, TableColumn] = {
+            col.column_name: col for col in self.columns
+        }
+        metrics_by_name: Dict[str, SqlMetric] = {m.metric_name: m for m in self.metrics}

Review comment:
       Interesting that mypy didn't pick up on the incorrect typing of `cols`.




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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org