mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
chore: upgrade black (#19410)
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user