chore: upgrade black (#19410)

This commit is contained in:
Ville Brofeldt
2022-03-29 20:03:09 +03:00
committed by GitHub
parent 816a2c3e1e
commit a619cb4ea9
204 changed files with 2125 additions and 608 deletions

View File

@@ -36,10 +36,16 @@ logger = logging.getLogger(__name__)
@click.command()
@click.argument("directory")
@click.option(
"--overwrite", "-o", is_flag=True, help="Overwriting existing metadata definitions",
"--overwrite",
"-o",
is_flag=True,
help="Overwriting existing metadata definitions",
)
@click.option(
"--force", "-f", is_flag=True, help="Force load data even if table already exists",
"--force",
"-f",
is_flag=True,
help="Force load data even if table already exists",
)
def import_directory(directory: str, overwrite: bool, force: bool) -> None:
"""Imports configs from a given directory"""
@@ -47,7 +53,9 @@ def import_directory(directory: str, overwrite: bool, force: bool) -> None:
from superset.examples.utils import load_configs_from_directory
load_configs_from_directory(
root=Path(directory), overwrite=overwrite, force_data=force,
root=Path(directory),
overwrite=overwrite,
force_data=force,
)
@@ -56,7 +64,9 @@ if feature_flags.get("VERSIONED_EXPORT"):
@click.command()
@with_appcontext
@click.option(
"--dashboard-file", "-f", help="Specify the the file to export to",
"--dashboard-file",
"-f",
help="Specify the the file to export to",
)
def export_dashboards(dashboard_file: Optional[str] = None) -> None:
"""Export dashboards to ZIP file"""
@@ -90,7 +100,9 @@ if feature_flags.get("VERSIONED_EXPORT"):
@click.command()
@with_appcontext
@click.option(
"--datasource-file", "-f", help="Specify the the file to export to",
"--datasource-file",
"-f",
help="Specify the the file to export to",
)
def export_datasources(datasource_file: Optional[str] = None) -> None:
"""Export datasources to ZIP file"""
@@ -122,7 +134,9 @@ if feature_flags.get("VERSIONED_EXPORT"):
@click.command()
@with_appcontext
@click.option(
"--path", "-p", help="Path to a single ZIP file",
"--path",
"-p",
help="Path to a single ZIP file",
)
@click.option(
"--username",
@@ -160,7 +174,9 @@ if feature_flags.get("VERSIONED_EXPORT"):
@click.command()
@with_appcontext
@click.option(
"--path", "-p", help="Path to a single ZIP file",
"--path",
"-p",
help="Path to a single ZIP file",
)
def import_datasources(path: str) -> None:
"""Import datasources from ZIP file"""
@@ -185,7 +201,6 @@ if feature_flags.get("VERSIONED_EXPORT"):
)
sys.exit(1)
else:
@click.command()