🎨 Bring Python code into compliance with Black and Flake8 (#121)

* Ignore Flake8 unused import error F401

https://flake8.readthedocs.io/en/latest/user/error-codes.html

The apparently unused imports may be needed for SQLAlchemy.

As the code comment says:

make sure all SQL Alchemy models are imported before initializing DB
otherwise, SQL Alchemy might fail to initialize properly relationships

See GitHub 28 and 29

* Ignore Flake8 unused variable error F841

https://flake8.readthedocs.io/en/latest/user/error-codes.html

The apparently unused variables may be needed for tests.

* Bring line length into compliance with Black

Should be 88 characters.

* Format alembic code with Black
This commit is contained in:
Brendon Smith
2020-04-17 08:20:48 -04:00
committed by GitHub
parent bcee2427b9
commit 21c4d11659
10 changed files with 51 additions and 48 deletions

View File

@@ -67,11 +67,9 @@ def run_migrations_online():
"""
configuration = config.get_section(config.config_ini_section)
configuration['sqlalchemy.url'] = get_url()
configuration["sqlalchemy.url"] = get_url()
connectable = engine_from_config(
configuration,
prefix="sqlalchemy.",
poolclass=pool.NullPool,
configuration, prefix="sqlalchemy.", poolclass=pool.NullPool,
)
with connectable.connect() as connection: