Skip to content

Commit 97ba5a7

Browse files
Clean up types
1 parent 539f892 commit 97ba5a7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/phoenix/trace/dsl/filter.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from sqlalchemy import case, literal
1313
from sqlalchemy.orm import Mapped, aliased
1414
from sqlalchemy.orm.util import AliasedClass
15-
from sqlalchemy.sql.expression import Select
15+
from sqlalchemy.sql.expression import ColumnElement, Select
1616
from typing_extensions import TypeAlias, TypeGuard, assert_never
1717

1818
import phoenix.trace.v1 as pb
@@ -65,7 +65,7 @@ def __post_init__(self) -> None:
6565
object.__setattr__(self, "table", table)
6666

6767
@property
68-
def attributes(self) -> typing.Iterator[tuple[str, Mapped[typing.Any]]]:
68+
def attributes(self) -> typing.Iterator[tuple[str, ColumnElement[typing.Any]]]:
6969
"""
7070
Alias names and attributes (i.e., columns) of the `span_annotation`
7171
relation.
@@ -794,7 +794,7 @@ def _apply_eval_aliasing(
794794
eval_aliases: dict[AnnotationName, AliasedAnnotationRelation] = {}
795795
for (
796796
annotation_expression,
797-
annotation_type,
797+
_annotation_type,
798798
annotation_name,
799799
annotation_attribute,
800800
) in _parse_annotation_expressions_and_names(source):
@@ -805,7 +805,7 @@ def _apply_eval_aliasing(
805805
source = source.replace(annotation_expression, alias_name)
806806

807807
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()
809809
annotation_name = quoted_eval_name[1:-1]
810810
if (eval_alias := eval_aliases.get(annotation_name)) is None:
811811
eval_alias = AliasedAnnotationRelation(index=len(eval_aliases), name=annotation_name)
@@ -831,11 +831,11 @@ def _parse_annotation_expressions_and_names(
831831
for match in EVAL_EXPRESSION_PATTERN.finditer(source):
832832
(
833833
annotation_expression,
834-
annotation_type,
834+
_annotation_type,
835835
quoted_eval_name,
836836
evaluation_attribute_name,
837837
) = match.groups()
838-
annotation_type = typing.cast(AnnotationType, annotation_type)
838+
annotation_type = typing.cast(AnnotationType, _annotation_type)
839839
yield (
840840
annotation_expression,
841841
annotation_type,

0 commit comments

Comments
 (0)