mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
chore(pre-commit): Add pyupgrade and pycln hooks (#24197)
This commit is contained in:
@@ -18,7 +18,7 @@ from __future__ import annotations
|
||||
|
||||
import copy
|
||||
import json
|
||||
from typing import Any, Dict, Set
|
||||
from typing import Any
|
||||
|
||||
from alembic import op
|
||||
from sqlalchemy import and_, Column, Integer, String, Text
|
||||
@@ -44,8 +44,8 @@ FORM_DATA_BAK_FIELD_NAME = "form_data_bak"
|
||||
|
||||
|
||||
class MigrateViz:
|
||||
remove_keys: Set[str] = set()
|
||||
rename_keys: Dict[str, str] = {}
|
||||
remove_keys: set[str] = set()
|
||||
rename_keys: dict[str, str] = {}
|
||||
source_viz_type: str
|
||||
target_viz_type: str
|
||||
has_x_axis_control: bool = False
|
||||
@@ -85,7 +85,7 @@ class MigrateViz:
|
||||
def _post_action(self) -> None:
|
||||
"""Some actions after migrate"""
|
||||
|
||||
def _migrate_temporal_filter(self, rv_data: Dict[str, Any]) -> None:
|
||||
def _migrate_temporal_filter(self, rv_data: dict[str, Any]) -> None:
|
||||
"""Adds a temporal filter."""
|
||||
granularity_sqla = rv_data.pop("granularity_sqla", None)
|
||||
time_range = rv_data.pop("time_range", None) or conf.get("DEFAULT_TIME_FILTER")
|
||||
|
||||
Reference in New Issue
Block a user