Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ authors = [{ name = "CocoIndex", email = "cocoindex.io@gmail.com" }]
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"typing-extensions>=4.12; python_version < '3.13'",
"click>=8.1.8",
"rich>=14.0.0",
"python-dotenv>=1.1.0",
Expand Down
10 changes: 8 additions & 2 deletions python/cocoindex/query_handler.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
import dataclasses
import numpy as np
from numpy import typing as npt
from typing import Generic, TypeVar
from typing import Generic, Any
from .index import VectorSimilarityMetric
import sys

if sys.version_info >= (3, 13):
from typing import TypeVar
else:
from typing_extensions import TypeVar # PEP 696 backport


@dataclasses.dataclass
Expand Down Expand Up @@ -35,7 +41,7 @@ class QueryInfo:
similarity_metric: VectorSimilarityMetric | None = None


R = TypeVar("R")
R = TypeVar("R", default=Any)


@dataclasses.dataclass
Expand Down
Loading