[mypy] Enforcing typing for superset.dashboards (#9418)

* [mypy] Enforcing typing for superset.dashboards

* Make return types equal on all commands

* Make return types equal on all commands

* [dashboard] address comments same return type on commands

* lint

* lint
This commit is contained in:
Daniel Vaz Gaspar
2020-04-07 12:52:14 +01:00
committed by GitHub
parent b487834d12
commit f9db3faade
14 changed files with 43 additions and 31 deletions

View File

@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
import logging
from typing import Any
from flask import g, make_response, request, Response
from flask_appbuilder.api import expose, protect, rison, safe
@@ -285,7 +286,9 @@ class DashboardRestApi(BaseSupersetModelRestApi):
@protect()
@safe
@rison(get_delete_ids_schema)
def bulk_delete(self, **kwargs) -> Response: # pylint: disable=arguments-differ
def bulk_delete(
self, **kwargs: Any
) -> Response: # pylint: disable=arguments-differ
"""Delete bulk Dashboards
---
delete:
@@ -343,7 +346,7 @@ class DashboardRestApi(BaseSupersetModelRestApi):
@protect()
@safe
@rison(get_export_ids_schema)
def export(self, **kwargs):
def export(self, **kwargs: Any) -> Response:
"""Export dashboards
---
get: