Skip to content

Commit 2123b52

Browse files
committed
Switch version:type matches
1 parent 677426c commit 2123b52

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

redisvl/index/index.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,11 @@
4949

5050
# Redis 5.x compatibility (6 fixed the import path)
5151
if redis_version.startswith("5"):
52-
from redis.commands.search.index_definition import IndexDefinition
52+
from redis.commands.search.indexDefinition import ( # type: ignore[import-untyped]
53+
IndexDefinition,
54+
)
5355
else:
54-
from redis.commands.search.indexDefinition import ( # type: ignore[import-untyped, no-redef]
56+
from redis.commands.search.index_definition import ( # type: ignore[no-redef]
5557
IndexDefinition,
5658
)
5759

redisvl/index/storage.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,13 @@
2121

2222
# Redis 5.x compatibility (6 fixed the import path)
2323
if redis_version.startswith("5"):
24-
from redis.commands.search.index_definition import IndexType
24+
from redis.commands.search.indexDefinition import ( # type: ignore[import-untyped]
25+
IndexType,
26+
)
2527
else:
26-
from redis.commands.search.indexDefinition import IndexType # type: ignore[import-untyped, no-redef]
28+
from redis.commands.search.index_definition import ( # type: ignore[no-redef]
29+
IndexType,
30+
)
2731

2832
from redisvl.exceptions import SchemaValidationError
2933
from redisvl.redis.utils import convert_bytes

redisvl/redis/utils.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,11 @@
2525

2626
# Redis 5.x compatibility (6 fixed the import path)
2727
if redis_version.startswith("5"):
28-
from redis.commands.search.index_definition import IndexDefinition
28+
from redis.commands.search.indexDefinition import ( # type: ignore[import-untyped]
29+
IndexDefinition,
30+
)
2931
else:
30-
from redis.commands.search.indexDefinition import ( # type: ignore[import-untyped, no-redef]
32+
from redis.commands.search.index_definition import ( # type: ignore[no-redef]
3133
IndexDefinition,
3234
)
3335

0 commit comments

Comments
 (0)