diff --git a/src/writer/core.py b/src/writer/core.py index 6caf58b5f..b0044546e 100644 --- a/src/writer/core.py +++ b/src/writer/core.py @@ -42,6 +42,7 @@ import pyarrow # type: ignore +import writer.workflows from writer import core_ui from writer.core_ui import Component from writer.ss_types import ( @@ -56,8 +57,6 @@ WriterFileItem, ) -import writer.workflows - if TYPE_CHECKING: import pandas import polars diff --git a/src/writer/workflows.py b/src/writer/workflows.py index 0b4b4d95a..481257966 100644 --- a/src/writer/workflows.py +++ b/src/writer/workflows.py @@ -1,7 +1,9 @@ from typing import Dict, List, Tuple + +import writer.core import writer.workflows_blocks from writer.core_ui import Component -import writer.core + def _get_workflow_nodes(component_id): return writer.core.base_component_tree.get_descendents(component_id) diff --git a/src/writer/workflows_blocks/__init__.py b/src/writer/workflows_blocks/__init__.py index ae50ce05d..5d64d8a7b 100644 --- a/src/writer/workflows_blocks/__init__.py +++ b/src/writer/workflows_blocks/__init__.py @@ -1,8 +1,8 @@ from writer.workflows_blocks.httprequest import HTTPRequest +from writer.workflows_blocks.runworkflow import RunWorkflow from writer.workflows_blocks.setstate import SetState from writer.workflows_blocks.writerclassification import WriterClassification from writer.workflows_blocks.writercompletion import WriterCompletion -from writer.workflows_blocks.runworkflow import RunWorkflow SetState.register("workflows_setstate") WriterClassification.register("workflows_writerclassification") diff --git a/src/writer/workflows_blocks/blocks.py b/src/writer/workflows_blocks/blocks.py index 37addd48b..5937f9588 100644 --- a/src/writer/workflows_blocks/blocks.py +++ b/src/writer/workflows_blocks/blocks.py @@ -1,8 +1,9 @@ -from typing import Dict -from writer.ss_types import InstancePath -import writer.workflows_blocks +from typing import Dict + import writer.core import writer.core_ui +import writer.workflows_blocks +from writer.ss_types import InstancePath block_map = {} diff --git a/src/writer/workflows_blocks/foreach.py b/src/writer/workflows_blocks/foreach.py index 162bf9da6..aeee67ab4 100644 --- a/src/writer/workflows_blocks/foreach.py +++ b/src/writer/workflows_blocks/foreach.py @@ -1,7 +1,8 @@ +import writer.workflows from writer.abstract import register_abstract_template from writer.ss_types import AbstractTemplate from writer.workflows_blocks.blocks import WorkflowBlock -import writer.workflows + class ForEach(WorkflowBlock): @@ -59,6 +60,6 @@ def run(self): for item in items: writer.workflows.run_workflow_by_key(self.session, workflow_key) self.outcome = "success" - except Exception as e: + except Exception: self.result = "HTTP call failed." self.outcome = "connectionError" \ No newline at end of file diff --git a/src/writer/workflows_blocks/httprequest.py b/src/writer/workflows_blocks/httprequest.py index 0ee6f1a26..6780b37f3 100644 --- a/src/writer/workflows_blocks/httprequest.py +++ b/src/writer/workflows_blocks/httprequest.py @@ -1,8 +1,10 @@ import requests + from writer.abstract import register_abstract_template from writer.ss_types import AbstractTemplate from writer.workflows_blocks.blocks import WorkflowBlock + class HTTPRequest(WorkflowBlock): @classmethod diff --git a/src/writer/workflows_blocks/runworkflow.py b/src/writer/workflows_blocks/runworkflow.py index 4724f9e44..257bd7460 100644 --- a/src/writer/workflows_blocks/runworkflow.py +++ b/src/writer/workflows_blocks/runworkflow.py @@ -1,7 +1,8 @@ +import writer.workflows from writer.abstract import register_abstract_template from writer.ss_types import AbstractTemplate from writer.workflows_blocks.blocks import WorkflowBlock -import writer.workflows + class RunWorkflow(WorkflowBlock): diff --git a/src/writer/workflows_blocks/setstate.py b/src/writer/workflows_blocks/setstate.py index 4d01b18f2..293014201 100644 --- a/src/writer/workflows_blocks/setstate.py +++ b/src/writer/workflows_blocks/setstate.py @@ -2,6 +2,7 @@ from writer.ss_types import AbstractTemplate from writer.workflows_blocks.blocks import WorkflowBlock + class SetState(WorkflowBlock): @classmethod @@ -45,5 +46,5 @@ def run(self): try: self.evaluator.set_state(element, self.instance_path, value) self.outcome = "success" - except Exception as e: + except Exception: self.outcome = "error" \ No newline at end of file diff --git a/src/writer/workflows_blocks/writerclassification.py b/src/writer/workflows_blocks/writerclassification.py index db9d52e28..fb0781256 100644 --- a/src/writer/workflows_blocks/writerclassification.py +++ b/src/writer/workflows_blocks/writerclassification.py @@ -1,4 +1,5 @@ import json + from writer.abstract import register_abstract_template from writer.ss_types import AbstractTemplate from writer.workflows_blocks.blocks import WorkflowBlock diff --git a/src/writer/workflows_blocks/writercompletion.py b/src/writer/workflows_blocks/writercompletion.py index e810aedc1..b9695bfd1 100644 --- a/src/writer/workflows_blocks/writercompletion.py +++ b/src/writer/workflows_blocks/writercompletion.py @@ -2,6 +2,7 @@ from writer.ss_types import AbstractTemplate from writer.workflows_blocks.blocks import WorkflowBlock + class WriterCompletion(WorkflowBlock): @classmethod