Skip to content

Commit a78e8c3

Browse files
committed
style: Apply linter formatting changes
1 parent 53900c5 commit a78e8c3

File tree

4 files changed

+20
-11
lines changed

4 files changed

+20
-11
lines changed

src/basic_memory/cli/commands/project.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
project_app = typer.Typer(help="Manage multiple Basic Memory projects")
3232
app.add_typer(project_app, name="project")
3333

34+
3435
def format_path(path: str) -> str:
3536
"""Format a path for display, using ~ for home directory."""
3637
home = str(Path.home())
@@ -69,7 +70,9 @@ async def _list_projects():
6970
@project_app.command("add")
7071
def add_project(
7172
name: str = typer.Argument(..., help="Name of the project"),
72-
path: str = typer.Argument(None, help="Path to the project directory (required for local mode)"),
73+
path: str = typer.Argument(
74+
None, help="Path to the project directory (required for local mode)"
75+
),
7376
set_default: bool = typer.Option(False, "--default", help="Set as default project"),
7477
) -> None:
7578
"""Add a new project.
@@ -213,9 +216,7 @@ async def _move_project():
213216
project_permalink = generate_permalink(name)
214217

215218
# TODO fix route to use ProjectPathDep
216-
response = await call_patch(
217-
client, f"/{name}/project/{project_permalink}", json=data
218-
)
219+
response = await call_patch(client, f"/{name}/project/{project_permalink}", json=data)
219220
return ProjectStatusResponse.model_validate(response.json())
220221

221222
try:

src/basic_memory/schemas/cloud.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,6 @@ class CloudProjectCreateResponse(BaseModel):
4545
status: str = Field(..., description="Status of the creation (success or error)")
4646
default: bool = Field(..., description="True if the project was set as the default")
4747
old_project: dict | None = Field(None, description="Information about the previous project")
48-
new_project: dict | None = Field(None, description="Information about the newly created project")
48+
new_project: dict | None = Field(
49+
None, description="Information about the newly created project"
50+
)

tests/cli/test_cloud_utils.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,9 @@ class TestSyncProject:
217217
async def test_syncs_project_successfully(self):
218218
"""Test successful project sync."""
219219
# Patch at the point where it's imported (inside the function)
220-
with patch("basic_memory.cli.commands.command_utils.run_sync", new_callable=AsyncMock) as mock_sync:
220+
with patch(
221+
"basic_memory.cli.commands.command_utils.run_sync", new_callable=AsyncMock
222+
) as mock_sync:
221223
await sync_project("test-project")
222224

223225
# Verify run_sync was called with project name
@@ -227,7 +229,9 @@ async def test_syncs_project_successfully(self):
227229
async def test_raises_error_on_sync_failure(self):
228230
"""Test that CloudUtilsError is raised on sync failure."""
229231
# Patch at the point where it's imported (inside the function)
230-
with patch("basic_memory.cli.commands.command_utils.run_sync", new_callable=AsyncMock) as mock_sync:
232+
with patch(
233+
"basic_memory.cli.commands.command_utils.run_sync", new_callable=AsyncMock
234+
) as mock_sync:
231235
mock_sync.side_effect = Exception("Sync failed")
232236

233237
with pytest.raises(CloudUtilsError) as exc_info:

tests/cli/test_upload.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
"""Tests for upload module."""
22

3-
import os
4-
from pathlib import Path
53
from unittest.mock import AsyncMock, Mock, patch
64

75
import httpx
@@ -126,7 +124,9 @@ async def test_uploads_directory(self, tmp_path):
126124

127125
with patch("basic_memory.cli.commands.cloud.upload.get_client") as mock_get_client:
128126
with patch("basic_memory.cli.commands.cloud.upload.call_put") as mock_put:
129-
with patch("basic_memory.cli.commands.cloud.upload._get_files_to_upload") as mock_get_files:
127+
with patch(
128+
"basic_memory.cli.commands.cloud.upload._get_files_to_upload"
129+
) as mock_get_files:
130130
with patch("aiofiles.open", create=True) as mock_aiofiles_open:
131131
# Setup mocks
132132
mock_get_client.return_value.__aenter__.return_value = mock_client
@@ -305,7 +305,9 @@ async def test_builds_correct_webdav_path(self, tmp_path):
305305

306306
with patch("basic_memory.cli.commands.cloud.upload.get_client") as mock_get_client:
307307
with patch("basic_memory.cli.commands.cloud.upload.call_put") as mock_put:
308-
with patch("basic_memory.cli.commands.cloud.upload._get_files_to_upload") as mock_get_files:
308+
with patch(
309+
"basic_memory.cli.commands.cloud.upload._get_files_to_upload"
310+
) as mock_get_files:
309311
with patch("aiofiles.open", create=True) as mock_aiofiles_open:
310312
mock_get_client.return_value.__aenter__.return_value = mock_client
311313
mock_get_client.return_value.__aexit__.return_value = None

0 commit comments

Comments
 (0)