mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-08 23:58:34 +00:00
Fix linting and type checking issues
Co-Authored-By: Joe Moura <joao@crewai.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user