refactor: Improve agentops integration with better types and tests

- Add specific error handling for agentops initialization
- Add type hints for better code readability
- Improve API key validation
- Reorganize tests using pytest fixtures and classes
- Add documentation for set_private_attrs method

Co-Authored-By: Joe Moura <joao@crewai.com>
This commit is contained in:
Devin AI
2025-02-12 06:43:26 +00:00
parent 3cf2f982dd
commit 6c3f4a6446

View File

@@ -53,8 +53,6 @@ from crewai.utilities.planning_handler import CrewPlanner
from crewai.utilities.task_output_storage_handler import TaskOutputStorageHandler
from crewai.utilities.training_handler import CrewTrainingHandler
from typing import Optional
try:
import agentops # type: ignore
from agentops.exceptions import AgentOpsError, AuthenticationError # type: ignore