mistercrunch commented on code in PR #29417: URL: https://github.com/apache/superset/pull/29417#discussion_r1920803005
########## superset/connectors/sqla/models.py: ########## @@ -360,10 +360,21 @@ def order_by_choices(self) -> list[tuple[str, str]]: def verbose_map(self) -> dict[str, str]: verb_map = {"__timestamp": "Time"} verb_map.update( - {o.metric_name: o.verbose_name or o.metric_name for o in self.metrics} + { + o.metric_name: verb_map.setdefault( Review Comment: not a big fan for `setdefault`, somehow it is super cryptic to me, had to read the docs and it's "get the value but set it if it doesn't exist". Ambiguous trying to be a getter and a setter at the same time. Can we go more verbose/procedural here using the normal getter/setter-type primitives? -- 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: notifications-unsubscr...@superset.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org