From f3fa4f11ba8cffc0836b39006875545be5f0e272 Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Mon, 19 Jan 2026 13:18:15 +0000 Subject: [PATCH] [autofix.ci] apply automated fixes --- api/repositories/workflow_collaboration_repository.py | 4 +--- api/services/workflow_collaboration_service.py | 4 +--- api/tests/unit_tests/services/test_workflow_service.py | 8 ++------ 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/api/repositories/workflow_collaboration_repository.py b/api/repositories/workflow_collaboration_repository.py index 2c06e90755..978cfd0fb0 100644 --- a/api/repositories/workflow_collaboration_repository.py +++ b/api/repositories/workflow_collaboration_repository.py @@ -130,9 +130,7 @@ class WorkflowCollaborationRepository: return self._decode(raw) def set_leader_if_absent(self, workflow_id: str, sid: str) -> bool: - return bool( - self._redis.set(self.leader_key(workflow_id), sid, nx=True, ex=SESSION_STATE_TTL_SECONDS) - ) + return bool(self._redis.set(self.leader_key(workflow_id), sid, nx=True, ex=SESSION_STATE_TTL_SECONDS)) def set_leader(self, workflow_id: str, sid: str) -> None: self._redis.set(self.leader_key(workflow_id), sid, ex=SESSION_STATE_TTL_SECONDS) diff --git a/api/services/workflow_collaboration_service.py b/api/services/workflow_collaboration_service.py index badb1b0575..e739e879e1 100644 --- a/api/services/workflow_collaboration_service.py +++ b/api/services/workflow_collaboration_service.py @@ -63,9 +63,7 @@ class WorkflowCollaborationService: self.handle_leader_disconnect(workflow_id, sid) self.broadcast_online_users(workflow_id) - def relay_collaboration_event( - self, sid: str, data: Mapping[str, object] - ) -> tuple[dict[str, str], int]: + def relay_collaboration_event(self, sid: str, data: Mapping[str, object]) -> tuple[dict[str, str], int]: mapping = self._repository.get_sid_mapping(sid) if not mapping: return {"msg": "unauthorized"}, 401 diff --git a/api/tests/unit_tests/services/test_workflow_service.py b/api/tests/unit_tests/services/test_workflow_service.py index 28891dbed1..a8e70ce872 100644 --- a/api/tests/unit_tests/services/test_workflow_service.py +++ b/api/tests/unit_tests/services/test_workflow_service.py @@ -633,9 +633,7 @@ class TestWorkflowService: # ==================== Draft Workflow Variable Update Tests ==================== # These tests verify updating draft workflow environment/conversation variables - def test_update_draft_workflow_environment_variables_updates_workflow( - self, workflow_service, mock_db_session - ): + def test_update_draft_workflow_environment_variables_updates_workflow(self, workflow_service, mock_db_session): """Test update_draft_workflow_environment_variables updates draft fields.""" app = TestWorkflowAssociatedDataFactory.create_app_mock() account = TestWorkflowAssociatedDataFactory.create_account_mock() @@ -670,9 +668,7 @@ class TestWorkflowService: account=account, ) - def test_update_draft_workflow_conversation_variables_updates_workflow( - self, workflow_service, mock_db_session - ): + def test_update_draft_workflow_conversation_variables_updates_workflow(self, workflow_service, mock_db_session): """Test update_draft_workflow_conversation_variables updates draft fields.""" app = TestWorkflowAssociatedDataFactory.create_app_mock() account = TestWorkflowAssociatedDataFactory.create_account_mock()