You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@superset.apache.org by "Beto Dealmeida (Jira)" <ji...@apache.org> on 2019/10/14 17:35:00 UTC
[jira] [Commented] (SUPERSET-11) Remove unnecessary parens in
druid/models.py
[ https://issues.apache.org/jira/browse/SUPERSET-11?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16951183#comment-16951183 ]
Beto Dealmeida commented on SUPERSET-11:
----------------------------------------
It's interesting, I though black ([https://pypi.org/project/black/]) would take care of this.
> 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
>
> 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.3.4#803005)