From 21a97fb4cf2471b82ac86730daa37ecb06e882cc Mon Sep 17 00:00:00 2001 From: burnettk Date: Tue, 28 Mar 2023 08:04:42 -0400 Subject: [PATCH] lint --- .../services/process_instance_processor.py | 4 ++-- .../services/workflow_execution_service.py | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_processor.py b/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_processor.py index 54ee33b2e..76b3d9ac6 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_processor.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_processor.py @@ -1,7 +1,5 @@ """Process_instance_processor.""" import _strptime # type: ignore -from sqlalchemy import or_ -from sqlalchemy import and_ import decimal import json import logging @@ -53,6 +51,8 @@ from SpiffWorkflow.spiff.serializer.config import SPIFF_SPEC_CONFIG # type: ign from SpiffWorkflow.task import Task as SpiffTask # type: ignore from SpiffWorkflow.task import TaskState from SpiffWorkflow.util.deep_merge import DeepMerge # type: ignore +from sqlalchemy import and_ +from sqlalchemy import or_ from spiffworkflow_backend.exceptions.api_error import ApiError from spiffworkflow_backend.models.bpmn_process import BpmnProcessModel diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/services/workflow_execution_service.py b/spiffworkflow-backend/src/spiffworkflow_backend/services/workflow_execution_service.py index 99ef4ee6d..ac0f1a41d 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/services/workflow_execution_service.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/services/workflow_execution_service.py @@ -1,8 +1,8 @@ import logging import time -from uuid import UUID from typing import Callable from typing import Optional +from uuid import UUID from SpiffWorkflow.bpmn.serializer.workflow import BpmnWorkflowSerializer # type: ignore from SpiffWorkflow.bpmn.workflow import BpmnWorkflow # type: ignore @@ -83,7 +83,7 @@ class TaskModelSavingDelegate(EngineStepDelegate): raise Exception("Could not find cached current_task_start_in_seconds. This should never have happend") task_model.start_in_seconds = self.current_task_start_in_seconds task_model.end_in_seconds = time.time() - self.last_completed_spiff_task= spiff_task + self.last_completed_spiff_task = spiff_task if self.secondary_engine_step_delegate: self.secondary_engine_step_delegate.did_complete_task(spiff_task) @@ -123,7 +123,9 @@ class TaskModelSavingDelegate(EngineStepDelegate): def _process_spiff_task_parents(self, spiff_task: SpiffTask) -> None: (parent_subprocess_guid, _parent_subprocess) = TaskService.task_subprocess(spiff_task) if parent_subprocess_guid is not None: - spiff_task_of_parent_subprocess = spiff_task.workflow._get_outermost_workflow().get_task(UUID(parent_subprocess_guid)) + spiff_task_of_parent_subprocess = spiff_task.workflow._get_outermost_workflow().get_task( + UUID(parent_subprocess_guid) + ) if spiff_task_of_parent_subprocess is not None: self._update_task_model_with_spiff_task(spiff_task_of_parent_subprocess)