Skip to content

Commit 331c278

Browse files
authored
Add parentheses for clarity in exit handler
Added parentheses around the boolean expression in `__exit__` to make the evaluation order explicit. This improves readability while maintaining identical functionality.
1 parent 430dbaa commit 331c278

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
@@ -183,7 +183,7 @@ def __enter__(self) -> Trace:
183183
return self
184184

185185
def __exit__(self, exc_type, exc_val, exc_tb):
186-
self.finish(reset_current=exc_type is not GeneratorExit)
186+
self.finish(reset_current=(exc_type is not GeneratorExit))
187187

188188
def export(self) -> dict[str, Any] | None:
189189
return {

0 commit comments

Comments
 (0)