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:
@@ -14,9 +14,9 @@
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
from typing import Any, Dict
|
||||
from typing import Any
|
||||
|
||||
databases_config: Dict[str, Any] = {
|
||||
databases_config: dict[str, Any] = {
|
||||
"databases/examples.yaml": {
|
||||
"database_name": "examples",
|
||||
"sqlalchemy_uri": "sqlite:///test.db",
|
||||
@@ -32,7 +32,7 @@ databases_config: Dict[str, Any] = {
|
||||
"allow_csv_upload": False,
|
||||
},
|
||||
}
|
||||
datasets_config: Dict[str, Any] = {
|
||||
datasets_config: dict[str, Any] = {
|
||||
"datasets/examples/video_game_sales.yaml": {
|
||||
"table_name": "video_game_sales",
|
||||
"main_dttm_col": None,
|
||||
@@ -80,7 +80,7 @@ datasets_config: Dict[str, Any] = {
|
||||
"database_uuid": "a2dc77af-e654-49bb-b321-40f6b559a1ee",
|
||||
},
|
||||
}
|
||||
charts_config_1: Dict[str, Any] = {
|
||||
charts_config_1: dict[str, Any] = {
|
||||
"charts/Games_per_Genre_over_time_95.yaml": {
|
||||
"slice_name": "Games per Genre over time",
|
||||
"viz_type": "line",
|
||||
@@ -100,7 +100,7 @@ charts_config_1: Dict[str, Any] = {
|
||||
"dataset_uuid": "53d47c0c-c03d-47f0-b9ac-81225f808283",
|
||||
},
|
||||
}
|
||||
dashboards_config_1: Dict[str, Any] = {
|
||||
dashboards_config_1: dict[str, Any] = {
|
||||
"dashboards/Video_Game_Sales_11.yaml": {
|
||||
"dashboard_title": "Video Game Sales",
|
||||
"description": None,
|
||||
@@ -182,7 +182,7 @@ dashboards_config_1: Dict[str, Any] = {
|
||||
},
|
||||
}
|
||||
|
||||
charts_config_2: Dict[str, Any] = {
|
||||
charts_config_2: dict[str, Any] = {
|
||||
"charts/Games_per_Genre_131.yaml": {
|
||||
"slice_name": "Games per Genre",
|
||||
"viz_type": "treemap",
|
||||
@@ -193,7 +193,7 @@ charts_config_2: Dict[str, Any] = {
|
||||
"dataset_uuid": "53d47c0c-c03d-47f0-b9ac-81225f808283",
|
||||
},
|
||||
}
|
||||
dashboards_config_2: Dict[str, Any] = {
|
||||
dashboards_config_2: dict[str, Any] = {
|
||||
"dashboards/Video_Game_Sales_11.yaml": {
|
||||
"dashboard_title": "Video Game Sales",
|
||||
"description": None,
|
||||
|
||||
@@ -14,11 +14,11 @@
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
from typing import Any, Dict
|
||||
from typing import Any
|
||||
from unittest.mock import Mock
|
||||
|
||||
|
||||
def get_column_mock(params: Dict[str, Any]) -> Mock:
|
||||
def get_column_mock(params: dict[str, Any]) -> Mock:
|
||||
mock = Mock()
|
||||
mock.id = params["id"]
|
||||
mock.column_name = params["column_name"]
|
||||
@@ -32,7 +32,7 @@ def get_column_mock(params: Dict[str, Any]) -> Mock:
|
||||
return mock
|
||||
|
||||
|
||||
def get_metric_mock(params: Dict[str, Any]) -> Mock:
|
||||
def get_metric_mock(params: dict[str, Any]) -> Mock:
|
||||
mock = Mock()
|
||||
mock.id = params["id"]
|
||||
mock.metric_name = params["metric_name"]
|
||||
|
||||
Reference in New Issue
Block a user