@@ -672,8 +672,8 @@ def _create_observation_from_otel_span(
672672 if as_type in get_args (ObservationTypeGenerationLike ):
673673 observation_class = self ._get_span_class (as_type )
674674 # Type ignore to prevent overloads of internal _get_span_class function,
675- # issue is that LangfuseEvent could be returned
676- return observation_class ( # type: ignore[return-value]
675+ # issue is that LangfuseEvent could be returned and that classes have diff. args
676+ return observation_class ( # type: ignore[return-value,call-arg ]
677677 otel_span = otel_span ,
678678 langfuse_client = self ,
679679 environment = self ._environment ,
@@ -694,8 +694,8 @@ def _create_observation_from_otel_span(
694694 # For other types (e.g. span, guardrail), create appropriate class without generation properties
695695 observation_class = self ._get_span_class (as_type )
696696 # Type ignore to prevent overloads of internal _get_span_class function,
697- # issue is that LangfuseEvent could be returned
698- return observation_class ( # type: ignore[return-value]
697+ # issue is that LangfuseEvent could be returned and that classes have diff. args
698+ return observation_class ( # type: ignore[return-value,call-arg ]
699699 otel_span = otel_span ,
700700 langfuse_client = self ,
701701 environment = self ._environment ,
@@ -1457,7 +1457,7 @@ def _start_as_current_otel_span_with_processed_media(
14571457 )
14581458 # For span and guardrail types, no generation properties needed
14591459
1460- yield span_class (** common_args )
1460+ yield span_class (** common_args ) # type: ignore[arg-type]
14611461
14621462 def _get_current_otel_span (self ) -> Optional [otel_trace_api .Span ]:
14631463 current_span = otel_trace_api .get_current_span ()
0 commit comments