mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-09 08:08:32 +00:00
Fix lint errors: remove trailing whitespace from docstrings
Co-Authored-By: João <joao@crewai.com>
This commit is contained in:
@@ -410,13 +410,13 @@ class ToolUsage:
|
|||||||
|
|
||||||
def _normalize_tool_name(self, name: str) -> str:
|
def _normalize_tool_name(self, name: str) -> str:
|
||||||
"""Normalize tool name for language-agnostic matching.
|
"""Normalize tool name for language-agnostic matching.
|
||||||
|
|
||||||
Converts to lowercase, removes extra whitespace, and replaces
|
Converts to lowercase, removes extra whitespace, and replaces
|
||||||
spaces/hyphens with underscores for consistent matching.
|
spaces/hyphens with underscores for consistent matching.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
name: The tool name to normalize
|
name: The tool name to normalize
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
Normalized tool name
|
Normalized tool name
|
||||||
"""
|
"""
|
||||||
@@ -430,10 +430,10 @@ class ToolUsage:
|
|||||||
|
|
||||||
def _get_tool_aliases(self, tool: Any) -> list[str]:
|
def _get_tool_aliases(self, tool: Any) -> list[str]:
|
||||||
"""Get all possible aliases for a tool including stable identifiers.
|
"""Get all possible aliases for a tool including stable identifiers.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
tool: The tool object
|
tool: The tool object
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
List of possible tool name aliases
|
List of possible tool name aliases
|
||||||
"""
|
"""
|
||||||
@@ -452,19 +452,19 @@ class ToolUsage:
|
|||||||
|
|
||||||
def _select_tool(self, tool_name: str) -> Any:
|
def _select_tool(self, tool_name: str) -> Any:
|
||||||
"""Select a tool by name with language-agnostic matching support.
|
"""Select a tool by name with language-agnostic matching support.
|
||||||
|
|
||||||
Supports matching against:
|
Supports matching against:
|
||||||
1. Exact tool name (case-insensitive)
|
1. Exact tool name (case-insensitive)
|
||||||
2. Normalized/slugified tool name
|
2. Normalized/slugified tool name
|
||||||
3. Stable short identifiers (delegate_work, ask_question)
|
3. Stable short identifiers (delegate_work, ask_question)
|
||||||
4. Fuzzy matching as fallback (0.85 threshold)
|
4. Fuzzy matching as fallback (0.85 threshold)
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
tool_name: The name of the tool to select
|
tool_name: The name of the tool to select
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
The selected tool object
|
The selected tool object
|
||||||
|
|
||||||
Raises:
|
Raises:
|
||||||
Exception: If no matching tool is found
|
Exception: If no matching tool is found
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user