From 3d98d6fb62cabb6fddffcac318453c55d096bb71 Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Wed, 2 Sep 2026 22:43:16 -0700 Subject: [PATCH] refactor(tools): join short implicit string concatenations (AST-verified) --- tools/project_tools.py | 3 +-- tools/registry.py | 9 +++------ tools/schema_sanitizer.py | 3 +-- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/tools/project_tools.py b/tools/project_tools.py index d479e2137d..0684e91ead 100644 --- a/tools/project_tools.py +++ b/tools/project_tools.py @@ -157,8 +157,7 @@ registry.register( "this chat into it — pass path to anchor it to a repo/folder (the " "chat's workspace moves there, the sidebar follows). switch: move " "this chat into an existing project by name/slug/id — the " - "intentional way to move the session, not `cd`. list: all " - "projects + which is active." + "intentional way to move the session, not `cd`. list: all projects + which is active." ), "parameters": { "type": "object", diff --git a/tools/registry.py b/tools/registry.py index 95863f04e9..619ee9a2df 100644 --- a/tools/registry.py +++ b/tools/registry.py @@ -316,8 +316,7 @@ def _run_check_fn_uncached(fn: Callable, *, unresolved_scope: bool = False) -> b # No traceback so this cannot be mistaken for a crashed check_fn. logger.debug( "check_fn %s hit the multiplex fail-closed path with no " - "profile secret scope active; dependent tools re-probe on " - "the first scoped turn", + "profile secret scope active; dependent tools re-probe on the first scoped turn", _fn_label(fn)) else: # The scope resolved but the read still failed closed: a genuinely lost scope. @@ -806,10 +805,8 @@ class ToolRegistry: and not self._plugin_override_allowed(caller_scope, caller_owner)): logger.error( "Tool deregistration REJECTED: plugin %r attempted to " - "remove tool %r (toolset %r) it does not own, without " - "operator opt-in. Set " - "plugins.entries.%s.allow_tool_override: true in " - "config.yaml to allow it.", + "remove tool %r (toolset %r) it does not own, without operator opt-in. Set " + "plugins.entries.%s.allow_tool_override: true in config.yaml to allow it.", caller_mod, name, entry.toolset, caller_mod) raise PermissionError( f"Plugin module {caller_mod!r} cannot deregister tool " diff --git a/tools/schema_sanitizer.py b/tools/schema_sanitizer.py index c412d73ca8..805cd17b14 100644 --- a/tools/schema_sanitizer.py +++ b/tools/schema_sanitizer.py @@ -317,8 +317,7 @@ def _sanitize_node(node: Any, path: str) -> Any: if isinstance(node, str): if node in _BARE_TYPE_NAMES: logger.debug( - "schema_sanitizer[%s]: replacing bare-string schema %r " - "with {'type': %r}", + "schema_sanitizer[%s]: replacing bare-string schema %r with {'type': %r}", path, node, node) return _empty_object() if node == "object" else {"type": node} logger.debug(