From c71a0f3a67a9fc34d1d26f51840840ca09a1350d Mon Sep 17 00:00:00 2001 From: Aldrian Harjati Date: Tue, 26 Sep 2023 11:27:36 -0400 Subject: [PATCH] fix linting issues --- src/db_revisions/env.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/db_revisions/env.py b/src/db_revisions/env.py index bd1d959..28a7317 100644 --- a/src/db_revisions/env.py +++ b/src/db_revisions/env.py @@ -38,15 +38,16 @@ else: load_dotenv() -INST_DB_USER = os.environ.get('INST_DB_USER') -INST_DB_PWD = os.environ.get('INST_DB_PWD') -INST_DB_HOST = os.environ.get('INST_DB_HOST') -INST_DB_NAME = os.environ.get('INST_DB_NAME') -INST_CONN = f'postgresql://{INST_DB_USER}:{INST_DB_PWD}@{INST_DB_HOST}/{INST_DB_NAME}' -config.set_main_option('sqlalchemy.url', INST_CONN) +INST_DB_USER = os.environ.get("INST_DB_USER") +INST_DB_PWD = os.environ.get("INST_DB_PWD") +INST_DB_HOST = os.environ.get("INST_DB_HOST") +INST_DB_NAME = os.environ.get("INST_DB_NAME") +INST_CONN = f"postgresql://{INST_DB_USER}:{INST_DB_PWD}@{INST_DB_HOST}/{INST_DB_NAME}" +config.set_main_option("sqlalchemy.url", INST_CONN) # end specific SBL configuration + def run_migrations_offline() -> None: """Run migrations in 'offline' mode. @@ -85,9 +86,7 @@ def run_migrations_online() -> None: ) with connectable.connect() as connection: - context.configure( - connection=connection, target_metadata=target_metadata - ) + context.configure(connection=connection, target_metadata=target_metadata) with context.begin_transaction(): context.run_migrations()