Skip to content

Commit 5be0b4f

Browse files
style: auto-format code with ruff
1 parent f6cf386 commit 5be0b4f

2 files changed

Lines changed: 5 additions & 14 deletions

File tree

src/orb/interface/server_command_handlers.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -464,8 +464,7 @@ async def handle_server_ui_export(args) -> dict[str, Any]:
464464
return {
465465
"status": "error",
466466
"message": (
467-
f"Destination '{dest}' already exists and is not empty. "
468-
"Use --force to overwrite."
467+
f"Destination '{dest}' already exists and is not empty. Use --force to overwrite."
469468
),
470469
}
471470

tests/unit/interface/test_server_ui_export.py

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@ async def test_export_copies_bundle_to_dest(tmp_path: Path) -> None:
2727

2828
from orb.interface.server_command_handlers import handle_server_ui_export
2929

30-
with patch(
31-
"orb.interface.server_command_handlers._ui_resolve_static_dir", return_value=source
32-
):
30+
with patch("orb.interface.server_command_handlers._ui_resolve_static_dir", return_value=source):
3331
result = await handle_server_ui_export(_args(str(dest)))
3432

3533
assert result["status"] == "ok"
@@ -44,9 +42,7 @@ async def test_export_returns_error_when_bundle_missing() -> None:
4442
"""Handler returns a clear error dict when _resolve_static_dir() returns None."""
4543
from orb.interface.server_command_handlers import handle_server_ui_export
4644

47-
with patch(
48-
"orb.interface.server_command_handlers._ui_resolve_static_dir", return_value=None
49-
):
45+
with patch("orb.interface.server_command_handlers._ui_resolve_static_dir", return_value=None):
5046
result = await handle_server_ui_export(_args("/tmp/irrelevant"))
5147

5248
assert result["status"] == "error"
@@ -67,9 +63,7 @@ async def test_export_rejects_non_empty_dest_without_force(tmp_path: Path) -> No
6763

6864
from orb.interface.server_command_handlers import handle_server_ui_export
6965

70-
with patch(
71-
"orb.interface.server_command_handlers._ui_resolve_static_dir", return_value=source
72-
):
66+
with patch("orb.interface.server_command_handlers._ui_resolve_static_dir", return_value=source):
7367
result = await handle_server_ui_export(_args(str(dest), force=False))
7468

7569
assert result["status"] == "error"
@@ -91,9 +85,7 @@ async def test_export_overwrites_non_empty_dest_with_force(tmp_path: Path) -> No
9185

9286
from orb.interface.server_command_handlers import handle_server_ui_export
9387

94-
with patch(
95-
"orb.interface.server_command_handlers._ui_resolve_static_dir", return_value=source
96-
):
88+
with patch("orb.interface.server_command_handlers._ui_resolve_static_dir", return_value=source):
9789
result = await handle_server_ui_export(_args(str(dest), force=True))
9890

9991
assert result["status"] == "ok"

0 commit comments

Comments
 (0)