Skip to content

Commit d238d7c

Browse files
authored
Merge branch 'master' into DOC-4796-fix-capped-lists-example
2 parents e289b38 + d989bcc commit d238d7c

File tree

9 files changed

+13
-10
lines changed

9 files changed

+13
-10
lines changed

doctests/query_agg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from redis.commands.search import Search
77
from redis.commands.search.aggregation import AggregateRequest
88
from redis.commands.search.field import NumericField, TagField
9-
from redis.commands.search.index_definition import IndexDefinition, IndexType
9+
from redis.commands.search.indexDefinition import IndexDefinition, IndexType
1010
import redis.commands.search.reducers as reducers
1111

1212
r = redis.Redis(decode_responses=True)

doctests/query_combined.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import warnings
77
from redis.commands.json.path import Path
88
from redis.commands.search.field import NumericField, TagField, TextField, VectorField
9-
from redis.commands.search.index_definition import IndexDefinition, IndexType
9+
from redis.commands.search.indexDefinition import IndexDefinition, IndexType
1010
from redis.commands.search.query import Query
1111
from sentence_transformers import SentenceTransformer
1212

doctests/query_em.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import redis
55
from redis.commands.json.path import Path
66
from redis.commands.search.field import TextField, NumericField, TagField
7-
from redis.commands.search.index_definition import IndexDefinition, IndexType
7+
from redis.commands.search.indexDefinition import IndexDefinition, IndexType
88
from redis.commands.search.query import NumericFilter, Query
99

1010
r = redis.Redis(decode_responses=True)

doctests/query_ft.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import redis
66
from redis.commands.json.path import Path
77
from redis.commands.search.field import TextField, NumericField, TagField
8-
from redis.commands.search.index_definition import IndexDefinition, IndexType
8+
from redis.commands.search.indexDefinition import IndexDefinition, IndexType
99
from redis.commands.search.query import NumericFilter, Query
1010

1111
r = redis.Redis(decode_responses=True)

doctests/query_geo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import redis
66
from redis.commands.json.path import Path
77
from redis.commands.search.field import GeoField, GeoShapeField
8-
from redis.commands.search.index_definition import IndexDefinition, IndexType
8+
from redis.commands.search.indexDefinition import IndexDefinition, IndexType
99
from redis.commands.search.query import Query
1010

1111
r = redis.Redis(decode_responses=True)

doctests/query_range.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import redis
66
from redis.commands.json.path import Path
77
from redis.commands.search.field import TextField, NumericField, TagField
8-
from redis.commands.search.index_definition import IndexDefinition, IndexType
8+
from redis.commands.search.indexDefinition import IndexDefinition, IndexType
99
from redis.commands.search.query import NumericFilter, Query
1010

1111
r = redis.Redis(decode_responses=True)

doctests/search_quickstart.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import redis.commands.search.reducers as reducers
1111
from redis.commands.json.path import Path
1212
from redis.commands.search.field import NumericField, TagField, TextField
13-
from redis.commands.search.index_definition import IndexDefinition, IndexType
13+
from redis.commands.search.indexDefinition import IndexDefinition, IndexType
1414
from redis.commands.search.query import Query
1515

1616
# HIDE_END

doctests/search_vss.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
TextField,
2121
VectorField,
2222
)
23-
from redis.commands.search.index_definition import IndexDefinition, IndexType
23+
from redis.commands.search.indexDefinition import IndexDefinition, IndexType
2424
from redis.commands.search.query import Query
2525
from sentence_transformers import SentenceTransformer
2626

redis/connection.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from itertools import chain
1010
from queue import Empty, Full, LifoQueue
1111
from time import time
12-
from typing import Any, Callable, Dict, List, Optional, Type, Union
12+
from typing import Any, Callable, Dict, List, Optional, Type, TypeVar, Union
1313
from urllib.parse import parse_qs, unquote, urlparse
1414

1515
from redis.cache import (
@@ -1263,6 +1263,9 @@ def parse_url(url):
12631263
return kwargs
12641264

12651265

1266+
_CP = TypeVar("_CP", bound="ConnectionPool")
1267+
1268+
12661269
class ConnectionPool:
12671270
"""
12681271
Create a connection pool. ``If max_connections`` is set, then this
@@ -1278,7 +1281,7 @@ class ConnectionPool:
12781281
"""
12791282

12801283
@classmethod
1281-
def from_url(cls, url, **kwargs):
1284+
def from_url(cls: Type[_CP], url: str, **kwargs) -> _CP:
12821285
"""
12831286
Return a connection pool configured from the given URL.
12841287

0 commit comments

Comments
 (0)