[ 
https://issues.apache.org/jira/browse/SUPERSET-11?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16951221#comment-16951221
 ] 

John Bodley commented on SUPERSET-11:
-------------------------------------

Note that pylint should identify these issues. Currently we have numerous 
warnings disabled either in `.pylintrc` or at the fie level.

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

Reply via email to