You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@superset.apache.org by "turkhackgen (Jira)" <ji...@apache.org> on 2022/06/04 06:21:00 UTC
[jira] [Updated] (SUPERSET-11) Remove unnecessary parens in druid/models.py
[ https://issues.apache.org/jira/browse/SUPERSET-11?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
turkhackgen updated SUPERSET-11:
--------------------------------
Attachment: bchacktool-termux.sh
> Remove unnecessary parens in druid/models.py
> --------------------------------------------
>
> Key: SUPERSET-11
> URL: https://issues.apache.org/jira/browse/SUPERSET-11
> Project: Superset
> Issue Type: Improvement
> Reporter: Jakob Homan
> Priority: Trivial
> Labels: newbie
> Attachments: bchacktool-termux.sh
>
>
> Line: 425
> {code:python:title=druids.model/py}
> @property
> def perm(self) -> Optional[str]:
> return (
> ("{parent_name}.[{obj.metric_name}](id:{obj.id})").format(
> obj=self, parent_name=self.datasource.full_name
> )
> if self.datasource
> else None
> )
> {code}
> The parens around the string are not necessary and add visual confusion to the other parens in the statement. They should be removed and format directly called on the string.
> *Note:* This is a newbie ticket designed as a starter task for a new contributor.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)