Skip to content

Commit c315083

Browse files
committed
fix(logging): remove redundant string concatenations in warning messages and error formatting for clarity
1 parent 3e78a6c commit c315083

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

sgr_agent_core/agent_config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def _definitions_from_dict(cls, data: dict) -> Self:
7070
# Check for agents that will be overridden
7171
overridden = set(cls._instance.agents.keys()) & set(custom_agents.keys())
7272
if overridden:
73-
logger.warning(f"Loaded agents will override existing agents: " f"{', '.join(sorted(overridden))}")
73+
logger.warning(f"Loaded agents will override existing agents: {', '.join(sorted(overridden))}")
7474

7575
cls._instance.agents.update(custom_agents)
7676

@@ -90,7 +90,7 @@ def _definitions_from_dict(cls, data: dict) -> Self:
9090
# Check for tools that will be overridden
9191
overridden_tools = set(cls._instance.tools.keys()) & set(custom_tools.keys())
9292
if overridden_tools:
93-
logger.warning(f"Loaded tools will override existing tools: " f"{', '.join(sorted(overridden_tools))}")
93+
logger.warning(f"Loaded tools will override existing tools: {', '.join(sorted(overridden_tools))}")
9494

9595
cls._instance.tools.update(custom_tools)
9696
return cls._instance

sgr_agent_core/services/tool_instantiator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ def build_model(self, content: str) -> "BaseTool":
391391
except ValidationError as e:
392392
for err in e.errors():
393393
self.errors.append(
394-
f"pydantic validation error - type: {err['type']} - " f"field: {err['loc']} - {err['msg']}"
394+
f"pydantic validation error - type: {err['type']} - field: {err['loc']} - {err['msg']}"
395395
)
396396
raise ValueError("Failed to build model") from e
397397
except JSONDecodeError as e:

0 commit comments

Comments
 (0)