mirror of
https://github.com/apache/superset.git
synced 2026-04-23 10:04:45 +00:00
chore(pre-commit): Add pyupgrade and pycln hooks (#24197)
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
import json
|
||||
from typing import Any, Dict, Union
|
||||
from typing import Any, Union
|
||||
|
||||
import prison
|
||||
from flask import Response
|
||||
@@ -49,13 +49,13 @@ class DashboardTestCase(SupersetTestCase):
|
||||
return self.client.get(DASHBOARDS_API_URL)
|
||||
|
||||
def save_dashboard_via_view(
|
||||
self, dashboard_id: Union[str, int], dashboard_data: Dict[str, Any]
|
||||
self, dashboard_id: Union[str, int], dashboard_data: dict[str, Any]
|
||||
) -> Response:
|
||||
save_dash_url = SAVE_DASHBOARD_URL_FORMAT.format(dashboard_id)
|
||||
return self.get_resp(save_dash_url, data=dict(data=json.dumps(dashboard_data)))
|
||||
|
||||
def save_dashboard(
|
||||
self, dashboard_id: Union[str, int], dashboard_data: Dict[str, Any]
|
||||
self, dashboard_id: Union[str, int], dashboard_data: dict[str, Any]
|
||||
) -> Response:
|
||||
return self.save_dashboard_via_view(dashboard_id, dashboard_data)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user