Skip to content

Commit c992f96

Browse files
DanielHashmivcshih
authored andcommitted
Make Trace class inherit from abc.ABC for proper abstract base class behavior (openai#1233)
The Trace class was using @abc.abstractmethod decorators without inheriting from abc.ABC, which meant the abstract methods weren't enforced. This change makes the class properly abstract while maintaining all existing functionality since no code directly instantiates Trace() - all usage goes through the concrete implementations NoOpTrace and TraceImpl.
1 parent 7d495d0 commit c992f96

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/agents/tracing/traces.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from .scope import Scope
1111

1212

13-
class Trace:
13+
class Trace(abc.ABC):
1414
"""
1515
A trace is the root level object that tracing creates. It represents a logical "workflow".
1616
"""

0 commit comments

Comments
 (0)