chore: format

This commit is contained in:
Timothy Jaeryang Baek
2026-02-23 01:40:53 -06:00
parent 424dba443c
commit 9044abf3bb
105 changed files with 3884 additions and 661 deletions
+15 -4
View File
@@ -65,12 +65,18 @@ async def get_tools(
# Local Tools
for tool in Tools.get_tools(defer_content=True, db=db):
tool_module = request.app.state.TOOLS.get(tool.id) if hasattr(request.app.state, 'TOOLS') else None
tool_module = (
request.app.state.TOOLS.get(tool.id)
if hasattr(request.app.state, "TOOLS")
else None
)
tools.append(
ToolUserResponse(
**{
**tool.model_dump(),
"has_user_valves": hasattr(tool_module, "UserValves") if tool_module else False,
"has_user_valves": (
hasattr(tool_module, "UserValves") if tool_module else False
),
}
)
)
@@ -212,8 +218,13 @@ async def get_tool_list(
or any(
g.permission == "write"
and (
(g.principal_type == "user" and (g.principal_id == user.id or g.principal_id == "*"))
or (g.principal_type == "group" and g.principal_id in user_group_ids)
(
g.principal_type == "user"
and (g.principal_id == user.id or g.principal_id == "*")
)
or (
g.principal_type == "group" and g.principal_id in user_group_ids
)
)
for g in tool.access_grants
)