Skip to content

Commit 8f8e67d

Browse files
style: apply ruff format to patched files
Co-authored-by: Ricardo Silveira Cabral <rdasilveiracabral@users.noreply.github.com>
1 parent 2e77e98 commit 8f8e67d

2 files changed

Lines changed: 13 additions & 5 deletions

File tree

src/nooa/runtime/sandbox/executor.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@
4343
)
4444

4545

46-
47-
4846
def _capabilities() -> Capabilities:
4947
global _CAPS_CACHE
5048
if _CAPS_CACHE is None:
@@ -280,7 +278,9 @@ async def run_cell(
280278
return dto_to_result(dto, signal_factory=self._signal_factory)
281279

282280
@staticmethod
283-
def _namespace_updates(builtins: dict[str, Any]) -> tuple[dict[str, Any], list[tuple[int, Any]] | None]:
281+
def _namespace_updates(
282+
builtins: dict[str, Any],
283+
) -> tuple[dict[str, Any], list[tuple[int, Any]] | None]:
284284
"""Return picklable per-cell namespace refreshes and an ``Out`` snapshot."""
285285
updates: dict[str, Any] = {}
286286
out_events: list[tuple[int, Any]] | None = None
@@ -404,13 +404,19 @@ def _is_visible_root_attr(self, name: str) -> bool:
404404

405405
def _validate_broker_path(self, path: list[str]) -> None:
406406
"""Reject worker-supplied paths that cross hidden/private boundaries."""
407-
if not isinstance(path, list) or not path or not all(isinstance(p, str) and p for p in path):
407+
if (
408+
not isinstance(path, list)
409+
or not path
410+
or not all(isinstance(p, str) and p for p in path)
411+
):
408412
raise AttributeError("invalid sandbox broker path")
409413
if not self._is_visible_root_attr(path[0]):
410414
raise AttributeError(f"sandbox broker cannot access hidden attribute self.{path[0]}")
411415
for part in path[1:]:
412416
if part.startswith("_") and part not in _BROKER_PROTOCOL_DUNDERS:
413-
raise AttributeError(f"sandbox broker cannot access private nested attribute {part}")
417+
raise AttributeError(
418+
f"sandbox broker cannot access private nested attribute {part}"
419+
)
414420

415421
async def _dispatch_tool_call(self, msg: dict[str, Any]) -> dict[str, Any]:
416422
"""Run a brokered ``self.<path>`` access against the parent's live agent."""

src/nooa/viewer/main.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ def _validate_journal_items(body: object) -> list[dict]:
139139
raise HTTPException(status_code=413, detail="Too many journal items")
140140
return body
141141

142+
142143
async def _ingest_worker() -> None:
143144
"""Drain _ingest_queue, writing batches to SQLite in a dedicated writer thread.
144145
@@ -266,6 +267,7 @@ async def viewer_auth_middleware(request: Request, call_next):
266267
headers={"WWW-Authenticate": "Bearer"},
267268
)
268269

270+
269271
app.add_middleware(
270272
CORSMiddleware,
271273
allow_origins=["*"],

0 commit comments

Comments
 (0)