We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 50c0bc3 commit b292e82Copy full SHA for b292e82
1 file changed
py/src/braintrust/wrappers/pytest_plugin/plugin.py
@@ -10,10 +10,12 @@
10
from __future__ import annotations
11
12
import traceback
13
-from typing import Any
+from typing import TYPE_CHECKING, Any
14
15
import pytest
16
-from braintrust.logger import NOOP_SPAN, Span
+
17
+if TYPE_CHECKING:
18
+ from braintrust.logger import Span
19
20
# ---------------------------------------------------------------------------
21
# Marker registration & CLI options (always active)
@@ -86,6 +88,8 @@ def braintrust_span(request: pytest.FixtureRequest) -> Span:
86
88
When ``--braintrust`` is not active the fixture returns a no-op span
87
89
that silently discards all logged data.
90
"""
91
+ from braintrust.logger import NOOP_SPAN
92
93
return getattr(request.node, "_braintrust_span", NOOP_SPAN)
94
95
0 commit comments