From 080a7d753f3c32a4b74c22550c672ef877cf3f1f Mon Sep 17 00:00:00 2001 From: Greyson LaLonde Date: Fri, 19 Sep 2025 00:09:44 -0400 Subject: [PATCH] fix: additional linting fixes from pre-commit hooks - Fixed import error handling in bedrock invoke agent tool - Fixed timeout in contextual AI rerank tool --- .../src/crewai_tools/aws/bedrock/agents/invoke_agent_tool.py | 4 +++- .../tools/contextualai_rerank_tool/contextual_rerank_tool.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/tools/src/crewai_tools/aws/bedrock/agents/invoke_agent_tool.py b/packages/tools/src/crewai_tools/aws/bedrock/agents/invoke_agent_tool.py index 1fa4d3067..8d46a7003 100644 --- a/packages/tools/src/crewai_tools/aws/bedrock/agents/invoke_agent_tool.py +++ b/packages/tools/src/crewai_tools/aws/bedrock/agents/invoke_agent_tool.py @@ -96,7 +96,9 @@ class BedrockInvokeAgentTool(BaseTool): import boto3 from botocore.exceptions import ClientError except ImportError as e: - raise ImportError("`boto3` package not found, please run `uv add boto3`") from e + raise ImportError( + "`boto3` package not found, please run `uv add boto3`" + ) from e try: # Initialize the Bedrock Agent Runtime client diff --git a/packages/tools/src/crewai_tools/tools/contextualai_rerank_tool/contextual_rerank_tool.py b/packages/tools/src/crewai_tools/tools/contextualai_rerank_tool/contextual_rerank_tool.py index 2dfa540b6..af4ee2543 100644 --- a/packages/tools/src/crewai_tools/tools/contextualai_rerank_tool/contextual_rerank_tool.py +++ b/packages/tools/src/crewai_tools/tools/contextualai_rerank_tool/contextual_rerank_tool.py @@ -66,7 +66,9 @@ class ContextualAIRerankTool(BaseTool): payload["metadata"] = metadata rerank_url = f"{base_url}/rerank" - result = requests.post(rerank_url, json=payload, headers=headers, timeout=30) + result = requests.post( + rerank_url, json=payload, headers=headers, timeout=30 + ) if result.status_code != 200: raise RuntimeError(