mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-07-03 14:09:24 +00:00
style: fix ruff formatting in trace_listener.py and utils.py
This commit is contained in:
@@ -204,7 +204,11 @@ class TraceCollectionListener(BaseEventListener):
|
||||
# Skip registration entirely if tracing is disabled and not first-time user
|
||||
# This avoids overhead of 50+ handler registrations when tracing won't be used
|
||||
# Also check is_tracing_enabled_in_context() so per-run overrides (Crew(tracing=True)) still work
|
||||
if not should_enable_tracing() and not is_tracing_enabled_in_context() and not should_auto_collect_first_time_traces():
|
||||
if (
|
||||
not should_enable_tracing()
|
||||
and not is_tracing_enabled_in_context()
|
||||
and not should_auto_collect_first_time_traces()
|
||||
):
|
||||
self._listeners_setup = True
|
||||
return
|
||||
|
||||
|
||||
@@ -490,10 +490,10 @@ def _is_interactive_terminal() -> bool:
|
||||
import sys
|
||||
|
||||
try:
|
||||
stdin = getattr(sys, 'stdin', None)
|
||||
stdin = getattr(sys, "stdin", None)
|
||||
if stdin is None:
|
||||
return False
|
||||
isatty = getattr(stdin, 'isatty', None)
|
||||
isatty = getattr(stdin, "isatty", None)
|
||||
if not callable(isatty):
|
||||
return False
|
||||
return bool(isatty())
|
||||
|
||||
Reference in New Issue
Block a user