From e022caae6c5c82ca5f9ae38ad218ede307853db4 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Sat, 3 Jan 2026 17:37:00 +0000 Subject: [PATCH] Fix W293 lint errors in usage_metrics.py docstrings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: João --- lib/crewai/src/crewai/types/usage_metrics.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/crewai/src/crewai/types/usage_metrics.py b/lib/crewai/src/crewai/types/usage_metrics.py index 2bcdbdd76..e486b3cbd 100644 --- a/lib/crewai/src/crewai/types/usage_metrics.py +++ b/lib/crewai/src/crewai/types/usage_metrics.py @@ -48,7 +48,7 @@ class UsageMetrics(BaseModel): class AgentTokenMetrics(BaseModel): """Token usage metrics for a specific agent. - + Attributes: agent_name: Name/role of the agent agent_id: Unique identifier for the agent @@ -57,7 +57,7 @@ class AgentTokenMetrics(BaseModel): completion_tokens: Completion tokens used by this agent successful_requests: Number of successful LLM requests """ - + agent_name: str = Field(description="Name/role of the agent") agent_id: str | None = Field(default=None, description="Unique identifier for the agent") total_tokens: int = Field(default=0, description="Total tokens used by this agent") @@ -69,7 +69,7 @@ class AgentTokenMetrics(BaseModel): class TaskTokenMetrics(BaseModel): """Token usage metrics for a specific task. - + Attributes: task_name: Name of the task task_id: Unique identifier for the task @@ -79,7 +79,7 @@ class TaskTokenMetrics(BaseModel): completion_tokens: Completion tokens used for this task successful_requests: Number of successful LLM requests """ - + task_name: str = Field(description="Name of the task") task_id: str | None = Field(default=None, description="Unique identifier for the task") agent_name: str = Field(description="Name of the agent that executed the task") @@ -92,7 +92,7 @@ class TaskTokenMetrics(BaseModel): class WorkflowTokenMetrics(BaseModel): """Complete token usage metrics for a crew workflow. - + Attributes: total_tokens: Total tokens used across entire workflow prompt_tokens: Total prompt tokens used @@ -101,7 +101,7 @@ class WorkflowTokenMetrics(BaseModel): per_agent: Dictionary mapping agent names to their token metrics per_task: Dictionary mapping task names to their token metrics """ - + total_tokens: int = Field(default=0, description="Total tokens used across entire workflow") prompt_tokens: int = Field(default=0, description="Total prompt tokens used") cached_prompt_tokens: int = Field(default=0, description="Total cached prompt tokens used")