Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
amitmiran137 committed Feb 14, 2021
1 parent 522c50c commit 25d482f
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions superset/dashboards/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# under the License.

# pylint: disable=too-few-public-methods
from typing import Any, cast, Optional
from typing import Any, Optional

from flask_appbuilder.security.sqla.models import Role
from flask_babel import lazy_gettext as _
Expand Down Expand Up @@ -47,9 +47,7 @@ def apply(self, query: Query, value: Any) -> Query:
)


class DashboardFavoriteFilter(
BaseFavoriteFilter
):
class DashboardFavoriteFilter(BaseFavoriteFilter):
"""
Custom filter for the GET list that filters all dashboards that a user has favored
"""
Expand Down Expand Up @@ -158,6 +156,5 @@ class FilterRelatedRoles(BaseFilter):
def apply(self, query: Query, value: Optional[Any]) -> Query:
role_model = security_manager.role_model
if value:
return query.filter(role_model.name.ilike(f'%{value}%'), )
else:
return query
return query.filter(role_model.name.ilike(f"%{value}%"),)
return query

0 comments on commit 25d482f

Please sign in to comment.