mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-10 08:38:30 +00:00
fix: type checking issues
This commit is contained in:
@@ -51,7 +51,7 @@ from crewai.utilities.training_handler import CrewTrainingHandler
|
||||
agentops = None
|
||||
if os.environ.get("AGENTOPS_API_KEY"):
|
||||
try:
|
||||
import agentops
|
||||
import agentops # type: ignore
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
|
||||
@@ -295,7 +295,7 @@ class Telemetry:
|
||||
pass
|
||||
|
||||
def individual_test_result_span(
|
||||
self, crew: Crew, quality: int, exec_time: int, model_name: str
|
||||
self, crew: Crew, quality: float, exec_time: int, model_name: str
|
||||
):
|
||||
if self.ready:
|
||||
try:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import ast
|
||||
from difflib import SequenceMatcher
|
||||
import os
|
||||
from difflib import SequenceMatcher
|
||||
from textwrap import dedent
|
||||
from typing import Any, List, Union
|
||||
|
||||
@@ -15,7 +15,7 @@ from crewai.utilities import I18N, Converter, ConverterError, Printer
|
||||
agentops = None
|
||||
if os.environ.get("AGENTOPS_API_KEY"):
|
||||
try:
|
||||
import agentops
|
||||
import agentops # type: ignore
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
@@ -118,7 +118,7 @@ class ToolUsage:
|
||||
tool: BaseTool,
|
||||
calling: Union[ToolCalling, InstructorToolCalling],
|
||||
) -> str: # TODO: Fix this return type
|
||||
tool_event = agentops.ToolEvent(name=calling.tool_name) if agentops else None
|
||||
tool_event = agentops.ToolEvent(name=calling.tool_name) if agentops else None # type: ignore
|
||||
if self._check_tool_repeated_usage(calling=calling): # type: ignore # _check_tool_repeated_usage of "ToolUsage" does not return a value (it only ever returns None)
|
||||
try:
|
||||
result = self._i18n.errors("task_repeated_usage").format(
|
||||
|
||||
Reference in New Issue
Block a user