diff --git a/poetry.lock b/poetry.lock index 0f1f50f0..6aa985e1 100644 --- a/poetry.lock +++ b/poetry.lock @@ -642,7 +642,7 @@ werkzeug = "*" type = "git" url = "https://github.com/sartography/flask-bpmn" reference = "main" -resolved_reference = "16eb4fc1b5b314934b2967a6727b09bb3b8479d0" +resolved_reference = "b33362f2d62bbb4c1d1a1c992f6b057c8e71431c" [[package]] name = "Flask-Cors" diff --git a/src/spiffworkflow_backend/routes/process_api_blueprint.py b/src/spiffworkflow_backend/routes/process_api_blueprint.py index ffe6742d..c3a2a24a 100644 --- a/src/spiffworkflow_backend/routes/process_api_blueprint.py +++ b/src/spiffworkflow_backend/routes/process_api_blueprint.py @@ -23,8 +23,8 @@ from flask_bpmn.api.api_error import ApiError from flask_bpmn.models.db import db from lxml import etree # type: ignore from lxml.builder import ElementMaker # type: ignore -from SpiffWorkflow import Task as SpiffTask # type: ignore -from SpiffWorkflow import TaskState +from SpiffWorkflow.task import Task as SpiffTask # type: ignore +from SpiffWorkflow.task import TaskState from sqlalchemy import desc from spiffworkflow_backend.exceptions.process_entity_not_found_error import ( diff --git a/src/spiffworkflow_backend/scripts/fact_service.py b/src/spiffworkflow_backend/scripts/fact_service.py index 4fb84a60..ea585d2a 100644 --- a/src/spiffworkflow_backend/scripts/fact_service.py +++ b/src/spiffworkflow_backend/scripts/fact_service.py @@ -2,7 +2,7 @@ from typing import Any from typing import Optional -from SpiffWorkflow import Task as SpiffTask # type: ignore +from SpiffWorkflow.task import Task as SpiffTask # type: ignore from spiffworkflow_backend.scripts.script import Script diff --git a/src/spiffworkflow_backend/scripts/get_env.py b/src/spiffworkflow_backend/scripts/get_env.py index 6d69e361..310bcdec 100644 --- a/src/spiffworkflow_backend/scripts/get_env.py +++ b/src/spiffworkflow_backend/scripts/get_env.py @@ -2,7 +2,7 @@ from typing import Any from typing import Optional -from SpiffWorkflow import Task as SpiffTask # type: ignore +from SpiffWorkflow.task import Task as SpiffTask # type: ignore from spiffworkflow_backend.scripts.script import Script diff --git a/src/spiffworkflow_backend/scripts/script.py b/src/spiffworkflow_backend/scripts/script.py index 16cc9b2c..f36e4ace 100644 --- a/src/spiffworkflow_backend/scripts/script.py +++ b/src/spiffworkflow_backend/scripts/script.py @@ -9,7 +9,7 @@ from typing import Any from typing import Callable from flask_bpmn.api.api_error import ApiError -from SpiffWorkflow import Task as SpiffTask # type: ignore +from SpiffWorkflow.task import Task as SpiffTask # type: ignore # Generally speaking, having some global in a flask app is TERRIBLE. # This is here, because after loading the application this will never change under diff --git a/src/spiffworkflow_backend/services/git_service.py b/src/spiffworkflow_backend/services/git_service.py index 6a192b97..815e4cad 100644 --- a/src/spiffworkflow_backend/services/git_service.py +++ b/src/spiffworkflow_backend/services/git_service.py @@ -43,13 +43,14 @@ class GitService: def commit(message: str) -> str: """Commit.""" bpmn_spec_absolute_dir = current_app.config["BPMN_SPEC_ABSOLUTE_DIR"] - git_username = '' - git_email = '' - if current_app.config["GIT_COMMIT_USERNAME"] and current_app.config["GIT_COMMIT_EMAIL"]: + git_username = "" + git_email = "" + if ( + current_app.config["GIT_COMMIT_USERNAME"] + and current_app.config["GIT_COMMIT_EMAIL"] + ): git_username = current_app.config["GIT_COMMIT_USERNAME"] git_email = current_app.config["GIT_COMMIT_EMAIL"] - shell_command = ( - f"./bin/git_commit_bpmn_models_repo '{bpmn_spec_absolute_dir}' '{message}' '{git_username}' '{git_email}'" - ) + shell_command = f"./bin/git_commit_bpmn_models_repo '{bpmn_spec_absolute_dir}' '{message}' '{git_username}' '{git_email}'" output = os.popen(shell_command).read() # noqa: S605 return output diff --git a/src/spiffworkflow_backend/services/process_instance_processor.py b/src/spiffworkflow_backend/services/process_instance_processor.py index 8ec69e72..c5a4c635 100644 --- a/src/spiffworkflow_backend/services/process_instance_processor.py +++ b/src/spiffworkflow_backend/services/process_instance_processor.py @@ -16,9 +16,6 @@ from flask import current_app from flask_bpmn.api.api_error import ApiError from flask_bpmn.models.db import db from lxml import etree # type: ignore -from SpiffWorkflow import Task as SpiffTask # type: ignore -from SpiffWorkflow import TaskState -from SpiffWorkflow import WorkflowException from SpiffWorkflow.bpmn.exceptions import WorkflowTaskExecException # type: ignore from SpiffWorkflow.bpmn.parser.ValidationException import ValidationException # type: ignore from SpiffWorkflow.bpmn.PythonScriptEngine import Box # type: ignore @@ -30,6 +27,7 @@ from SpiffWorkflow.bpmn.specs.events import EndEvent from SpiffWorkflow.bpmn.workflow import BpmnWorkflow # type: ignore from SpiffWorkflow.dmn.parser.BpmnDmnParser import BpmnDmnParser # type: ignore from SpiffWorkflow.dmn.serializer import BusinessRuleTaskConverter # type: ignore +from SpiffWorkflow.exceptions import WorkflowException # type: ignore from SpiffWorkflow.serializer.exceptions import MissingSpecError # type: ignore from SpiffWorkflow.spiff.parser.process import SpiffBpmnParser # type: ignore from SpiffWorkflow.spiff.serializer import BoundaryEventConverter # type: ignore @@ -47,6 +45,8 @@ from SpiffWorkflow.spiff.serializer import StartEventConverter from SpiffWorkflow.spiff.serializer import SubWorkflowTaskConverter from SpiffWorkflow.spiff.serializer import TransactionSubprocessConverter from SpiffWorkflow.spiff.serializer import UserTaskConverter +from SpiffWorkflow.task import Task as SpiffTask # type: ignore +from SpiffWorkflow.task import TaskState from SpiffWorkflow.util.deep_merge import DeepMerge # type: ignore from spiffworkflow_backend.models.active_task import ActiveTaskModel diff --git a/src/spiffworkflow_backend/services/script_unit_test_runner.py b/src/spiffworkflow_backend/services/script_unit_test_runner.py index b9756050..9112e20f 100644 --- a/src/spiffworkflow_backend/services/script_unit_test_runner.py +++ b/src/spiffworkflow_backend/services/script_unit_test_runner.py @@ -6,8 +6,8 @@ from dataclasses import dataclass from typing import Any from typing import Optional -from SpiffWorkflow import Task as SpiffTask # type: ignore from SpiffWorkflow.bpmn.exceptions import WorkflowTaskExecException # type: ignore +from SpiffWorkflow.task import Task as SpiffTask # type: ignore from spiffworkflow_backend.services.process_instance_processor import ( CustomBpmnScriptEngine,