From 45d5f49a98560e237d5e168d3ddcc232015eb1e5 Mon Sep 17 00:00:00 2001 From: qizhicheng Date: Thu, 30 Nov 2023 13:31:42 +0800 Subject: [PATCH] black --- sql/utils/test_workflow_audit.py | 14 ++++++++++---- sql/utils/workflow_audit.py | 5 ++++- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/sql/utils/test_workflow_audit.py b/sql/utils/test_workflow_audit.py index 7323d28500..c3a0e2f45f 100644 --- a/sql/utils/test_workflow_audit.py +++ b/sql/utils/test_workflow_audit.py @@ -22,7 +22,13 @@ WorkflowAuditSetting, ) from sql.utils.tests import User -from sql.utils.workflow_audit import Audit, AuditV2, AuditSetting, AuditException, ReviewNodeType +from sql.utils.workflow_audit import ( + Audit, + AuditV2, + AuditSetting, + AuditException, + ReviewNodeType, +) class TestAudit(TestCase): @@ -549,9 +555,9 @@ def test_get_review_info( def test_get_review_info_auto_pass( - sql_query_apply, - fake_generate_audit_setting, - admin_client, + sql_query_apply, + fake_generate_audit_setting, + admin_client, ): # 自动通过的情况 fake_generate_audit_setting.return_value = AuditSetting(auto_pass=True) diff --git a/sql/utils/workflow_audit.py b/sql/utils/workflow_audit.py index c3861caf94..3e87b0bcc4 100644 --- a/sql/utils/workflow_audit.py +++ b/sql/utils/workflow_audit.py @@ -50,12 +50,15 @@ class ReviewNode: def __post_init__(self): if self.node_type == ReviewNodeType.GROUP and not self.group: - raise ValueError(f"group not provided and node_type is set as {self.node_type}") + raise ValueError( + f"group not provided and node_type is set as {self.node_type}" + ) @property def is_auto_pass(self): return self.node_type == ReviewNodeType.AUTO_PASS + @dataclass class ReviewInfo: nodes: List[ReviewNode] = field(default_factory=list)