Skip to content

Commit 28e11b7

Browse files
authored
Fix ImportError when opentelemetry is not installed (#1773)
1 parent b7137cb commit 28e11b7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pydantic_graph/pydantic_graph/graph.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
import logfire_api
1212
import typing_extensions
13-
from opentelemetry.trace import Span
1413
from typing_extensions import deprecated
1514
from typing_inspection import typing_objects
1615

@@ -212,7 +211,7 @@ async def iter(
212211
state: StateT = None,
213212
deps: DepsT = None,
214213
persistence: BaseStatePersistence[StateT, RunEndT] | None = None,
215-
span: AbstractContextManager[Span] | None = None,
214+
span: AbstractContextManager[AbstractSpan] | None = None,
216215
infer_name: bool = True,
217216
) -> AsyncIterator[GraphRun[StateT, DepsT, RunEndT]]:
218217
"""A contextmanager which can be used to iterate over the graph's nodes as they are executed.

0 commit comments

Comments
 (0)