Update to redis 4.1.4 (#7247)

Closes: #7245
This commit is contained in:
Sebastian Rittau
2022-02-17 10:33:33 +01:00
committed by GitHub
parent 4a0dabda1b
commit e3742686b1
4 changed files with 66 additions and 3 deletions

View File

@@ -1,2 +1,3 @@
redis.client.Pipeline.transaction # instance attribute has same name as superclass method
redis.commands.search.commands.SearchCommands.explain # https://github.com/redis/redis-py/pull/1997
redis.ocsp # requires cryptography to be installed

View File

@@ -1,6 +1,13 @@
from collections.abc import Mapping
from typing import Any
from typing_extensions import Literal
from .aggregation import AggregateRequest, AggregateResult, Cursor
from .query import Query
from .result import Result
_QueryParams = Mapping[str, str | float]
NUMERIC: Literal["NUMERIC"]
CREATE_CMD: Literal["FT.CREATE"]
@@ -75,10 +82,11 @@ class SearchCommands:
def load_document(self, id): ...
def get(self, *ids): ...
def info(self): ...
def search(self, query): ...
def explain(self, query): ...
def get_params_args(self, query_params: _QueryParams) -> list[Any]: ...
def search(self, query: str | Query, query_params: _QueryParams | None = ...) -> Result: ...
def explain(self, query: str | Query, query_params: _QueryParams | None = ...): ...
def explain_cli(self, query): ...
def aggregate(self, query): ...
def aggregate(self, query: AggregateRequest | Cursor, query_params: _QueryParams | None = ...) -> AggregateResult: ...
def profile(self, query, limited: bool = ...): ...
def spellcheck(self, query, distance: Any | None = ..., include: Any | None = ..., exclude: Any | None = ...): ...
def dict_add(self, name, *terms): ...

View File

@@ -0,0 +1,47 @@
from typing import Any
class Query:
def __init__(self, query_string) -> None: ...
def query_string(self): ...
def limit_ids(self, *ids): ...
def return_fields(self, *fields): ...
def return_field(self, field, as_field: Any | None = ...): ...
def summarize(
self, fields: Any | None = ..., context_len: Any | None = ..., num_frags: Any | None = ..., sep: Any | None = ...
): ...
def highlight(self, fields: Any | None = ..., tags: Any | None = ...): ...
def language(self, language): ...
def slop(self, slop): ...
def in_order(self): ...
def scorer(self, scorer): ...
def get_args(self): ...
def paging(self, offset, num): ...
def verbatim(self): ...
def no_content(self): ...
def no_stopwords(self): ...
def with_payloads(self): ...
def with_scores(self): ...
def limit_fields(self, *fields): ...
def add_filter(self, flt): ...
def sort_by(self, field, asc: bool = ...): ...
def expander(self, expander): ...
class Filter:
args: Any
def __init__(self, keyword, field, *args) -> None: ...
class NumericFilter(Filter):
INF: str
NEG_INF: str
def __init__(self, field, minval, maxval, minExclusive: bool = ..., maxExclusive: bool = ...) -> None: ...
class GeoFilter(Filter):
METERS: str
KILOMETERS: str
FEET: str
MILES: str
def __init__(self, field, lon, lat, radius, unit=...) -> None: ...
class SortbyField:
args: Any
def __init__(self, field, asc: bool = ...) -> None: ...

View File

@@ -0,0 +1,7 @@
from typing import Any
class Result:
total: Any
duration: Any
docs: Any
def __init__(self, res, hascontent, duration: int = ..., has_payload: bool = ..., with_scores: bool = ...) -> None: ...