From 3bff3e0dcd4c0651759b778ccfbd3c279087dbd8 Mon Sep 17 00:00:00 2001 From: guzzijones Date: Mon, 10 Jul 2023 13:46:58 +0000 Subject: [PATCH] black formatting --- orquesta/conducting.py | 1 - orquesta/tests/hacking/import_aliases_rule.py | 2 -- orquesta/tests/unit/base.py | 2 -- .../unit/conducting/test_workflow_conductor_data_flow.py | 5 ++--- orquesta/tests/unit/utils/test_strings.py | 2 +- 5 files changed, 3 insertions(+), 9 deletions(-) diff --git a/orquesta/conducting.py b/orquesta/conducting.py index 18d7634a..13196aeb 100644 --- a/orquesta/conducting.py +++ b/orquesta/conducting.py @@ -370,7 +370,6 @@ def log_entry( result=None, data=None, ): - # Check entry type. if entry_type not in ["info", "warn", "error"]: raise exc.WorkflowLogEntryError('The log entry type "%s" is not valid.' % entry_type) diff --git a/orquesta/tests/hacking/import_aliases_rule.py b/orquesta/tests/hacking/import_aliases_rule.py index f6eb2539..8114bb58 100644 --- a/orquesta/tests/hacking/import_aliases_rule.py +++ b/orquesta/tests/hacking/import_aliases_rule.py @@ -59,7 +59,6 @@ def get_alias(logical_line): - parts = logical_line.split() if ( @@ -68,7 +67,6 @@ def get_alias(logical_line): and parts[1] != "__future__" and not core.is_import_exception(parts[1]) ): - # from path.to.module import module if len(parts) == 4: return ".".join([parts[1], parts[3]]), None diff --git a/orquesta/tests/unit/base.py b/orquesta/tests/unit/base.py index a4aa287f..d0cca988 100644 --- a/orquesta/tests/unit/base.py +++ b/orquesta/tests/unit/base.py @@ -156,7 +156,6 @@ def format_task_item( items_count=None, items_concurrency=None, ): - if not actions and items_count is None: actions = [{"action": spec.action, "input": spec.input}] @@ -285,7 +284,6 @@ def assert_task_items( concurrency=None, mock_ac_ex_results=None, ): - # Set up test cases. tests = list(zip(mock_ac_ex_statuses, expected_task_statuses, expected_workflow_statuses)) tk_ex_result = [None] * len(items) diff --git a/orquesta/tests/unit/conducting/test_workflow_conductor_data_flow.py b/orquesta/tests/unit/conducting/test_workflow_conductor_data_flow.py index 02822925..caa8eb07 100644 --- a/orquesta/tests/unit/conducting/test_workflow_conductor_data_flow.py +++ b/orquesta/tests/unit/conducting/test_workflow_conductor_data_flow.py @@ -25,7 +25,6 @@ class WorkflowConductorDataFlowTest(test_base.WorkflowConductorTest): - wf_def_yaql = """ version: 1.0 @@ -157,14 +156,14 @@ def assert_data_flow(self, input_value): def assert_unicode_data_flow(self, input_value): inputs = { - u"a1": ( + "a1": ( str_util.unicode(input_value, encoding_type="utf-8", force=True) if six.PY2 else input_value ) } - expected_output = {u"a5": inputs["a1"], u"b5": inputs["a1"]} + expected_output = {"a5": inputs["a1"], "b5": inputs["a1"]} self._assert_data_flow(inputs, expected_output) diff --git a/orquesta/tests/unit/utils/test_strings.py b/orquesta/tests/unit/utils/test_strings.py index 4817aaa9..0cab37c7 100644 --- a/orquesta/tests/unit/utils/test_strings.py +++ b/orquesta/tests/unit/utils/test_strings.py @@ -28,7 +28,7 @@ def test_unescape(self): def test_unicode(self): self.assertEqual(str_util.unicode(123), 123) self.assertEqual(str_util.unicode("foobar"), "foobar") - self.assertEqual(str_util.unicode(u"fubar" if six.PY2 else str("fubar")), "fubar") + self.assertEqual(str_util.unicode("fubar" if six.PY2 else str("fubar")), "fubar") self.assertEqual(str_util.unicode("鐵甲奇俠"), "鐵甲奇俠") self.assertEqual(str_util.unicode("\xe9\x90\xb5\xe7\x94\xb2"), "\xe9\x90\xb5\xe7\x94\xb2")