Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
dpgaspar committed Apr 7, 2022
1 parent 94b7073 commit 585e47d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
1 change: 0 additions & 1 deletion superset/dashboards/dao.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
from datetime import datetime
from typing import Any, Dict, List, Optional, Union

from sqlalchemy import or_
from sqlalchemy.exc import SQLAlchemyError

from superset import security_manager
Expand Down
8 changes: 5 additions & 3 deletions superset/dashboards/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,12 @@ class DashboardCreatedByMeFilter(BaseFilter): # pylint: disable=too-few-public-
arg_name = "created_by_me"

def apply(self, query: Query, value: Any) -> Query:
return query.filter( # pylint: disable=comparison-with-callable
return query.filter(
or_(
Dashboard.created_by_fk == g.user.get_user_id(),
Dashboard.changed_by_fk == g.user.get_user_id(),
Dashboard.created_by_fk # pylint: disable=comparison-with-callable
== g.user.get_user_id(),
Dashboard.changed_by_fk # pylint: disable=comparison-with-callable
== g.user.get_user_id(),
)
)

Expand Down
3 changes: 1 addition & 2 deletions superset/dashboards/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@
import re
from typing import Any, Dict, Union

from marshmallow import fields, post_dump, post_load, Schema
from marshmallow import fields, post_load, Schema
from marshmallow.validate import Length, ValidationError

from superset.exceptions import SupersetException
from superset.models.dashboard import Dashboard
from superset.utils import core as utils

get_delete_ids_schema = {"type": "array", "items": {"type": "integer"}}
Expand Down

0 comments on commit 585e47d

Please sign in to comment.