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

@@ -18,7 +18,7 @@ import logging
import sys
from datetime import datetime
from pathlib import Path
from typing import List, Optional
from typing import Optional
from zipfile import is_zipfile, ZipFile
import click
@@ -309,7 +309,7 @@ else:
from superset.dashboards.commands.importers.v0 import ImportDashboardsCommand
path_object = Path(path)
files: List[Path] = []
files: list[Path] = []
if path_object.is_file():
files.append(path_object)
elif path_object.exists() and not recursive:
@@ -363,7 +363,7 @@ else:
sync_metrics = "metrics" in sync_array
path_object = Path(path)
files: List[Path] = []
files: list[Path] = []
if path_object.is_file():
files.append(path_object)
elif path_object.exists() and not recursive: