From 331c278b6384ff0c0131eff03b698ae682867691 Mon Sep 17 00:00:00 2001 From: MUHAMMAD SALMAN HUSSAIN <160324527+mshsheikh@users.noreply.github.com> Date: Sat, 26 Jul 2025 03:43:36 +0500 Subject: [PATCH] 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. --- src/agents/tracing/traces.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/agents/tracing/traces.py b/src/agents/tracing/traces.py index 00aa0ba19..22ed40f01 100644 --- a/src/agents/tracing/traces.py +++ b/src/agents/tracing/traces.py @@ -183,7 +183,7 @@ def __enter__(self) -> Trace: return self def __exit__(self, exc_type, exc_val, exc_tb): - self.finish(reset_current=exc_type is not GeneratorExit) + self.finish(reset_current=(exc_type is not GeneratorExit)) def export(self) -> dict[str, Any] | None: return {