Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
feng-tao committed Apr 11, 2020
1 parent ffa1c55 commit 8fb6b43
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions search_service/api/dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@

from flask_restful import fields, Resource, marshal_with, reqparse # noqa: I201
from flasgger import swag_from
from amundsen_common.models.dashboard import DashboardSummary, DashboardSummarySchema

from search_service.proxy import get_proxy_client


DASHBOARD_INDEX = 'dashboard_search_index'


# Use common
# todo: Use common to produce this
dashboard_fields = {
"uri": fields.String,
"cluster": fields.String,
Expand All @@ -26,7 +25,7 @@

search_dashboard_results = {
"total_results": fields.Integer,
"results": fields.Nested(DashboardSummary, default=[])
"results": fields.Nested(dashboard_fields, default=[])
}


Expand All @@ -46,6 +45,7 @@ def __init__(self) -> None:

super(SearchDashboardAPI, self).__init__()

@marshal_with(search_dashboard_results)
@swag_from('swagger_doc/dashboard/search_dashboard.yml')
def get(self) -> Iterable[Any]:
"""
Expand Down
3 changes: 1 addition & 2 deletions search_service/models/dashboard.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from typing import List, Set
from typing import Set

import attr
from marshmallow_annotations.ext.attrs import AttrsSchema
from amundsen_common.models.dashboard import DashboardSummary, DashboardSummarySchema

from search_service.models.base import Base
Expand Down

0 comments on commit 8fb6b43

Please sign in to comment.