diff --git a/src/spiff_workflow_webapp/config/__init__.py b/src/spiff_workflow_webapp/config/__init__.py index 20e4ddc4..35368dce 100644 --- a/src/spiff_workflow_webapp/config/__init__.py +++ b/src/spiff_workflow_webapp/config/__init__.py @@ -1,11 +1,15 @@ """__init__.py.""" import os + +from flask.app import Flask from werkzeug.utils import ImportStringError -project_root = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "..")) +project_root = os.path.abspath( + os.path.join(os.path.dirname(__file__), "..", "..", "..") +) -def setup_config(app): +def setup_config(app: Flask) -> None: """Setup_config.""" app.config["SQLALCHEMY_TRACK_MODIFICATIONS"] = False app.config.from_object("spiff_workflow_webapp.config.default") diff --git a/src/spiff_workflow_webapp/config/default.py b/src/spiff_workflow_webapp/config/default.py index f8a46212..0430dead 100644 --- a/src/spiff_workflow_webapp/config/default.py +++ b/src/spiff_workflow_webapp/config/default.py @@ -1,2 +1,4 @@ """Default.""" -SQLALCHEMY_DATABASE_URI = "mysql+mysqlconnector://root:@localhost/spiff_workflow_webapp_development" +SQLALCHEMY_DATABASE_URI = ( + "mysql+mysqlconnector://root:@localhost/spiff_workflow_webapp_development" +) diff --git a/src/spiff_workflow_webapp/config/development.py b/src/spiff_workflow_webapp/config/development.py index b32d6120..5da131a0 100644 --- a/src/spiff_workflow_webapp/config/development.py +++ b/src/spiff_workflow_webapp/config/development.py @@ -1,2 +1,4 @@ """Development.""" -SQLALCHEMY_DATABASE_URI = "mysql+mysqlconnector://root:@localhost/spiff_workflow_webapp_development" +SQLALCHEMY_DATABASE_URI = ( + "mysql+mysqlconnector://root:@localhost/spiff_workflow_webapp_development" +) diff --git a/src/spiff_workflow_webapp/config/testing.py b/src/spiff_workflow_webapp/config/testing.py index fd10da7f..c78cb50f 100644 --- a/src/spiff_workflow_webapp/config/testing.py +++ b/src/spiff_workflow_webapp/config/testing.py @@ -5,7 +5,9 @@ import os if os.environ.get("TEST_DATABASE_TYPE") == "sqlite": SQLALCHEMY_DATABASE_URI = "sqlite:///db.sqlite3" else: - SQLALCHEMY_DATABASE_URI = "mysql+mysqlconnector://root:@localhost/spiff_workflow_webapp_testing" + SQLALCHEMY_DATABASE_URI = ( + "mysql+mysqlconnector://root:@localhost/spiff_workflow_webapp_testing" + ) TESTING = True BPMN_SPEC_DIR = "tests/spiff_workflow_webapp/files/bpmn_specs" diff --git a/src/spiff_workflow_webapp/db.sqlite3 b/src/spiff_workflow_webapp/db.sqlite3 index b01bbbfc..e0ceec92 100644 Binary files a/src/spiff_workflow_webapp/db.sqlite3 and b/src/spiff_workflow_webapp/db.sqlite3 differ diff --git a/src/spiff_workflow_webapp/models/permission_assignment.py b/src/spiff_workflow_webapp/models/permission_assignment.py index 6631826f..e81fdba6 100644 --- a/src/spiff_workflow_webapp/models/permission_assignment.py +++ b/src/spiff_workflow_webapp/models/permission_assignment.py @@ -2,8 +2,8 @@ import enum from flask_bpmn.models.db import db -from sqlalchemy import Enum -from sqlalchemy import ForeignKey # type: ignore +from sqlalchemy import Enum # type: ignore +from sqlalchemy import ForeignKey from spiff_workflow_webapp.models.permission import PermissionModel from spiff_workflow_webapp.models.permission_target import PermissionTargetModel