mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-25 16:18:13 +00:00
fix linting with ruff check --fix
This commit is contained in:
@@ -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):
|
||||||
|
|||||||
Reference in New Issue
Block a user