diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000000000000000000000000000000000000..a9b2cc982e715d8012b642b69071d67b1dc8123b --- /dev/null +++ b/.flake8 @@ -0,0 +1,4 @@ +[flake8] +# E501: let black handle line length +# W503 is incompatible with PEP 8 +ignore = E501,W503 diff --git a/migrations/env.py b/migrations/env.py index e956c4b9aa8eee05990c58b4ccf2d7eefbc16ecf..6b4933f4fdb0e3cc69b97f6013a465a63799b37b 100755 --- a/migrations/env.py +++ b/migrations/env.py @@ -3,6 +3,7 @@ from alembic import context from sqlalchemy import engine_from_config, pool from logging.config import fileConfig import logging +from flask import current_app # this is the Alembic Config object, which provides # access to the values within the .ini file in use. @@ -13,12 +14,6 @@ config = context.config fileConfig(config.config_file_name) logger = logging.getLogger("alembic.env") -# add your model's MetaData object here -# for 'autogenerate' support -# from myapp import mymodel -# target_metadata = mymodel.Base.metadata -from flask import current_app - config.set_main_option( "sqlalchemy.url", current_app.config.get("SQLALCHEMY_DATABASE_URI") )