File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 1010readme = " README.md"
1111requires-python = " >=3.11"
1212dependencies = [
13+ " typing-extensions>=4.12; python_version < '3.13'" ,
1314 " click>=8.1.8" ,
1415 " rich>=14.0.0" ,
1516 " python-dotenv>=1.1.0" ,
Original file line number Diff line number Diff line change 11import dataclasses
22import numpy as np
33from numpy import typing as npt
4- from typing import Generic , TypeVar
4+ from typing import Generic , Any
55from .index import VectorSimilarityMetric
6+ import sys
7+
8+ if sys .version_info >= (3 , 13 ):
9+ from typing import TypeVar
10+ else :
11+ from typing_extensions import TypeVar # PEP 696 backport
612
713
814@dataclasses .dataclass
@@ -35,7 +41,7 @@ class QueryInfo:
3541 similarity_metric : VectorSimilarityMetric | None = None
3642
3743
38- R = TypeVar ("R" )
44+ R = TypeVar ("R" , default = Any )
3945
4046
4147@dataclasses .dataclass
You can’t perform that action at this time.
0 commit comments