chore(pre-commit): Add pyupgrade and pycln hooks (#24197)

This commit is contained in:
John Bodley
2023-06-01 12:01:10 -07:00
committed by GitHub
parent 7d7ce63970
commit a4d5d7c6b9
448 changed files with 3084 additions and 3305 deletions

View File

@@ -17,7 +17,7 @@
"""Utils to provide dashboards for tests"""
import json
from typing import Any, Dict, List, Optional
from typing import Optional
from pandas import DataFrame
@@ -65,7 +65,7 @@ def create_table_metadata(
def create_slice(
title: str, viz_type: str, table: SqlaTable, slices_dict: Dict[str, str]
title: str, viz_type: str, table: SqlaTable, slices_dict: dict[str, str]
) -> Slice:
return Slice(
slice_name=title,
@@ -77,7 +77,7 @@ def create_slice(
def create_dashboard(
slug: str, title: str, position: str, slices: List[Slice]
slug: str, title: str, position: str, slices: list[Slice]
) -> Dashboard:
dash = db.session.query(Dashboard).filter_by(slug=slug).one_or_none()
if dash: