[autofix.ci] apply automated fixes

This commit is contained in:
autofix-ci[bot] 2026-01-19 13:18:15 +00:00 committed by GitHub
parent cb8fc9cf2d
commit f3fa4f11ba
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 12 deletions

View File

@ -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)

View File

@ -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

View File

@ -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()