fix: resolve ruff lint errors and mypy type error

- Remove unused import get_user_credential (F401)
- Add noqa: PLR0915 for 3 large functions exceeding 50 statements
- Cast result_data['q'] to str for _append_domain_filters (mypy arg-type)

Co-authored-by: Ishaan Jaff <ishaan-jaff@users.noreply.github.com>
This commit is contained in:
Cursor Agent 2026-03-07 02:45:24 +00:00
parent ff8e01d20b
commit 693a291412
5 changed files with 4 additions and 5 deletions

View file

@ -439,7 +439,7 @@ def _build_streaming_logging_obj(
return logging_obj
async def asend_message_streaming(
async def asend_message_streaming( # noqa: PLR0915
a2a_client: Optional["A2AClientType"] = None,
request: Optional["SendStreamingMessageRequest"] = None,
api_base: Optional[str] = None,

View file

@ -159,7 +159,7 @@ class SearchAPIConfig(BaseSearchConfig):
domains = optional_params["search_domain_filter"]
if isinstance(domains, list) and len(domains) > 0:
result_data["q"] = self._append_domain_filters(
result_data["q"], domains
str(result_data["q"]), domains
)
if "country" in optional_params:

View file

@ -1644,7 +1644,7 @@ if MCP_AVAILABLE:
},
)
async def execute_mcp_tool(
async def execute_mcp_tool( # noqa: PLR0915
name: str,
arguments: Dict[str, Any],
allowed_mcp_servers: List[MCPServer],

View file

@ -269,7 +269,7 @@ async def get_agent_card(
tags=["[beta] A2A Agents"],
dependencies=[Depends(user_api_key_auth)],
)
async def invoke_agent_a2a(
async def invoke_agent_a2a( # noqa: PLR0915
agent_id: str,
request: Request,
fastapi_response: Response,

View file

@ -81,7 +81,6 @@ if MCP_AVAILABLE:
delete_user_credential,
get_all_mcp_servers_for_user,
get_mcp_server,
get_user_credential,
store_user_credential,
update_mcp_server,
)