From 62840136be572ece6d0cdf908c71f3cdfece4fdd Mon Sep 17 00:00:00 2001 From: - <-> Date: Fri, 11 Jun 2021 15:36:54 +0200 Subject: [PATCH] used old black version --- aerich/cli.py | 25 +++++-------------------- aerich/utils.py | 3 +-- 2 files changed, 6 insertions(+), 22 deletions(-) diff --git a/aerich/cli.py b/aerich/cli.py index 63bc522..8b7c310 100644 --- a/aerich/cli.py +++ b/aerich/cli.py @@ -48,11 +48,7 @@ def coro(f): @click.group(context_settings={"help_option_names": ["-h", "--help"]}) @click.version_option(__version__, "-V", "--version") @click.option( - "-c", - "--config", - default="aerich.ini", - show_default=True, - help="Config file.", + "-c", "--config", default="aerich.ini", show_default=True, help="Config file.", ) @click.option("--app", required=False, help="Tortoise-ORM app name.") @click.option( @@ -125,9 +121,7 @@ async def upgrade(ctx: Context): for upgrade_query in upgrade_query_list: await conn.execute_script(upgrade_query) await Aerich.create( - version=version_file, - app=app, - content=get_models_describe(app), + version=version_file, app=app, content=get_models_describe(app), ) click.secho(f"Success upgrade {version_file}", fg=Color.green) migrated = True @@ -221,10 +215,7 @@ async def history(ctx: Context): help="Tortoise-ORM config module dict variable, like settings.TORTOISE_ORM.", ) @click.option( - "--location", - default="./migrations", - show_default=True, - help="Migrate store location.", + "--location", default="./migrations", show_default=True, help="Migrate store location.", ) @click.option( "-s", @@ -297,9 +288,7 @@ async def init_db(ctx: Context, safe): version = await Migrate.generate_version() await Aerich.create( - version=version, - app=app, - content=get_models_describe(app), + version=version, app=app, content=get_models_describe(app), ) content = { "upgrade": [schema], @@ -310,11 +299,7 @@ async def init_db(ctx: Context, safe): @cli.command(help="Introspects the database tables to standard output as TortoiseORM model.") @click.option( - "-t", - "--table", - help="Which tables to inspect.", - multiple=True, - required=False, + "-t", "--table", help="Which tables to inspect.", multiple=True, required=False, ) @click.pass_context @coro diff --git a/aerich/utils.py b/aerich/utils.py index 25547f1..d56e5a2 100644 --- a/aerich/utils.py +++ b/aerich/utils.py @@ -36,8 +36,7 @@ def get_app_connection_name(config, app_name: str) -> str: if app: return app.get("default_connection", "default") raise BadOptionUsage( - option_name="--app", - message=f'Can\'t get app named "{app_name}"', + option_name="--app", message=f'Can\'t get app named "{app_name}"', )