villebro commented on a change in pull request #16227:
URL: https://github.com/apache/superset/pull/16227#discussion_r687507053



##########
File path: superset/utils/core.py
##########
@@ -1306,7 +1305,7 @@ def get_metric_name(metric: Metric) -> str:
             if column_name:
                 return column_name
         raise ValueError(__("Invalid metric object"))
-    return cast(str, metric)
+    return metric  # type: ignore

Review comment:
       For some reason `mypy` didn't pick up that `Union[str, AdhocMetric]` 
becomes `str` after we do `is_adhoc_metric(metric)` above




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to