Fix linting and type checking issues

Co-Authored-By: Joe Moura <joao@crewai.com>
This commit is contained in:
Devin AI
2025-03-16 22:37:48 +00:00
parent 91675a4298
commit 88c5a0dd01
2 changed files with 4 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
class AgentExecutionTimeoutError(Exception):
"""Exception raised when an agent execution exceeds the maximum allowed time."""
def __init__(self, max_execution_time: int, message: str = None):
def __init__(self, max_execution_time: int, message: str | None = None):
self.max_execution_time = max_execution_time
self.message = message or f"Agent execution exceeded maximum allowed time of {max_execution_time} seconds"
super().__init__(self.message)

View File

@@ -1,6 +1,7 @@
import time
import pytest
from unittest.mock import patch, MagicMock
import time
from unittest.mock import MagicMock, patch
from crewai import Agent, Task
def test_agent_max_execution_time():