🎨 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
@@ -5,7 +5,7 @@ from app.schemas.user import UserCreate
# make sure all SQL Alchemy models are imported before initializing DB
# otherwise, SQL Alchemy might fail to initialize relationships properly
# for more details: https://github.com/tiangolo/full-stack-fastapi-postgresql/issues/28
from app.db import base
from app.db import base # noqa: F401
def init_db(db_session):
@@ -21,4 +21,4 @@ def init_db(db_session):
password=settings.FIRST_SUPERUSER_PASSWORD,
is_superuser=True,
)
user = crud.user.create(db_session, obj_in=user_in)
user = crud.user.create(db_session, obj_in=user_in) # noqa: F841