fix linting with ruff check --fix

This commit is contained in:
Greyson LaLonde
2025-04-16 12:24:57 -07:00
parent b2772fd5b9
commit 148dca3520

View File

@@ -10,7 +10,7 @@ from importlib.metadata import version
from typing import TYPE_CHECKING, Any, Optional from typing import TYPE_CHECKING, Any, Optional
from crewai.telemetry.constants import ( from crewai.telemetry.constants import (
CREWAI_TELEMETRY_BASE_URL, CREWAI_TELEMETRY_BASE_URL,
CREWAI_TELEMETRY_SERVICE_NAME, CREWAI_TELEMETRY_SERVICE_NAME,
) )
@@ -79,12 +79,12 @@ class Telemetry:
): ):
raise # Re-raise the exception to not interfere with system signals raise # Re-raise the exception to not interfere with system signals
self.ready = False self.ready = False
def _is_telemetry_disabled(self) -> bool: def _is_telemetry_disabled(self) -> bool:
"""Check if telemetry should be disabled based on environment variables.""" """Check if telemetry should be disabled based on environment variables."""
return ( return (
os.getenv("OTEL_SDK_DISABLED", "false").lower() == "true" or os.getenv("OTEL_SDK_DISABLED", "false").lower() == "true"
os.getenv("CREWAI_DISABLE_TELEMETRY", "false").lower() == "true" or os.getenv("CREWAI_DISABLE_TELEMETRY", "false").lower() == "true"
) )
def set_tracer(self): def set_tracer(self):