Skip to content

Commit 9512f06

Browse files
committed
fix mypy
1 parent 9f3349f commit 9512f06

2 files changed

Lines changed: 5 additions & 8 deletions

File tree

langfuse/_client/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1660,7 +1660,7 @@ def update_current_trace(
16601660
current_otel_span = self._get_current_otel_span()
16611661

16621662
if current_otel_span is not None:
1663-
existing_observation_type = current_otel_span.attributes.get(
1663+
existing_observation_type = current_otel_span.attributes.get( # type: ignore[attr-defined]
16641664
LangfuseOtelSpanAttributes.OBSERVATION_TYPE, "span"
16651665
)
16661666
# We need to preserve the class to keep the corret observation type

langfuse/_client/span.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1465,11 +1465,9 @@ def start_as_current_generation(
14651465
DeprecationWarning,
14661466
stacklevel=2,
14671467
)
1468-
return cast(
1469-
_AgnosticContextManager["LangfuseGeneration"],
1470-
self.start_as_current_observation(
1471-
name=name,
1472-
as_type="generation",
1468+
return self.start_as_current_observation(
1469+
name=name,
1470+
as_type="generation",
14731471
input=input,
14741472
output=output,
14751473
metadata=metadata,
@@ -1482,8 +1480,7 @@ def start_as_current_generation(
14821480
usage_details=usage_details,
14831481
cost_details=cost_details,
14841482
prompt=prompt,
1485-
),
1486-
)
1483+
)
14871484

14881485
def create_event(
14891486
self,

0 commit comments

Comments
 (0)