12
12
from sqlalchemy import case , literal
13
13
from sqlalchemy .orm import Mapped , aliased
14
14
from sqlalchemy .orm .util import AliasedClass
15
- from sqlalchemy .sql .expression import Select
15
+ from sqlalchemy .sql .expression import ColumnElement , Select
16
16
from typing_extensions import TypeAlias , TypeGuard , assert_never
17
17
18
18
import phoenix .trace .v1 as pb
@@ -65,7 +65,7 @@ def __post_init__(self) -> None:
65
65
object .__setattr__ (self , "table" , table )
66
66
67
67
@property
68
- def attributes (self ) -> typing .Iterator [tuple [str , Mapped [typing .Any ]]]:
68
+ def attributes (self ) -> typing .Iterator [tuple [str , ColumnElement [typing .Any ]]]:
69
69
"""
70
70
Alias names and attributes (i.e., columns) of the `span_annotation`
71
71
relation.
@@ -794,7 +794,7 @@ def _apply_eval_aliasing(
794
794
eval_aliases : dict [AnnotationName , AliasedAnnotationRelation ] = {}
795
795
for (
796
796
annotation_expression ,
797
- annotation_type ,
797
+ _annotation_type ,
798
798
annotation_name ,
799
799
annotation_attribute ,
800
800
) in _parse_annotation_expressions_and_names (source ):
@@ -805,7 +805,7 @@ def _apply_eval_aliasing(
805
805
source = source .replace (annotation_expression , alias_name )
806
806
807
807
for match in EVAL_NAME_PATTERN .finditer (source ):
808
- annotation_expression , annotation_type , quoted_eval_name = match .groups ()
808
+ annotation_expression , _ , quoted_eval_name = match .groups ()
809
809
annotation_name = quoted_eval_name [1 :- 1 ]
810
810
if (eval_alias := eval_aliases .get (annotation_name )) is None :
811
811
eval_alias = AliasedAnnotationRelation (index = len (eval_aliases ), name = annotation_name )
@@ -831,11 +831,11 @@ def _parse_annotation_expressions_and_names(
831
831
for match in EVAL_EXPRESSION_PATTERN .finditer (source ):
832
832
(
833
833
annotation_expression ,
834
- annotation_type ,
834
+ _annotation_type ,
835
835
quoted_eval_name ,
836
836
evaluation_attribute_name ,
837
837
) = match .groups ()
838
- annotation_type = typing .cast (AnnotationType , annotation_type )
838
+ annotation_type = typing .cast (AnnotationType , _annotation_type )
839
839
yield (
840
840
annotation_expression ,
841
841
annotation_type ,
0 commit comments