Skip to content

Commit 0f85948

Browse files
[autofix.ci] apply automated fixes
1 parent 51800f8 commit 0f85948

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

src/backend/base/langflow/api/utils/kb_windows_cleanup.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def force_delete_kb(kb_path: Path, kb_name: str) -> bool:
110110
for attempt in range(_MAX_DELETE_RETRIES):
111111
try:
112112
if attempt > 0:
113-
wait = _BASE_BACKOFF_SECONDS * (2 ** attempt)
113+
wait = _BASE_BACKOFF_SECONDS * (2**attempt)
114114
time.sleep(wait)
115115

116116
_remove_sqlite_lock_files(kb_path)
@@ -127,7 +127,9 @@ def force_delete_kb(kb_path: Path, kb_name: str) -> bool:
127127
if attempt < _MAX_DELETE_RETRIES - 1:
128128
logger.debug("Windows KB deletion attempt %d failed for %s: %s", attempt + 1, kb_name, e)
129129
else:
130-
logger.warning("Windows KB deletion failed for %s after %d attempts: %s", kb_name, _MAX_DELETE_RETRIES, e)
130+
logger.warning(
131+
"Windows KB deletion failed for %s after %d attempts: %s", kb_name, _MAX_DELETE_RETRIES, e
132+
)
131133

132134
# Last resort: rename for deferred cleanup
133135
if kb_path.exists():

src/backend/tests/unit/test_kb_windows_cleanup.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@
88
import shutil
99
import uuid
1010
from pathlib import Path
11-
from unittest.mock import AsyncMock, MagicMock, patch
11+
from unittest.mock import MagicMock, patch
1212

1313
import pytest
1414

15-
1615
# ---------------------------------------------------------------------------
1716
# Fixtures
1817
# ---------------------------------------------------------------------------
@@ -299,8 +298,6 @@ class TestDeleteEndpointPlatformBranching:
299298
async def test_delete_should_use_standard_path_on_macos(
300299
self, mock_root, mock_teardown, mock_platform, client, logged_in_headers, tmp_path
301300
):
302-
from httpx import AsyncClient
303-
304301
mock_root.return_value = tmp_path
305302
(tmp_path / "activeuser" / "My_KB").mkdir(parents=True)
306303

0 commit comments

Comments
 (0)