Skip to content

Typos in commands.py #3719

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
30 changes: 15 additions & 15 deletions redis/commands/vectorset/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def vadd(
``numlinks`` sets the number of links to create for the vector.
If not provided, the default number of links is used.

For more information see https://redis.io/commands/vadd
For more information, see https://redis.io/commands/vadd.
"""
if not vector or not element:
raise DataError("Both vector and element must be provided")
Expand Down Expand Up @@ -143,16 +143,16 @@ def vsim(

``ef`` sets the exploration factor.

``filter`` sets filter that should be applied for the search.
``filter`` sets the filter that should be applied for the search.

``filter_ef`` sets the max filtering effort.

``truth`` when enabled forces the command to perform linear scan.
``truth`` when enabled, forces the command to perform a linear scan.

``no_thread`` when enabled forces the command to execute the search
on the data structure in the main thread.

For more information see https://redis.io/commands/vsim
For more information, see https://redis.io/commands/vsim.
"""

if not input:
Expand Down Expand Up @@ -203,7 +203,7 @@ def vdim(self, key: KeyT) -> Union[Awaitable[int], int]:

Raises `redis.exceptions.ResponseError` if the vector set doesn't exist.

For more information see https://redis.io/commands/vdim
For more information, see https://redis.io/commands/vdim.
"""
return self.execute_command(VDIM_CMD, key)

Expand All @@ -213,15 +213,15 @@ def vcard(self, key: KeyT) -> Union[Awaitable[int], int]:

Raises `redis.exceptions.ResponseError` if the vector set doesn't exist.

For more information see https://redis.io/commands/vcard
For more information, see https://redis.io/commands/vcard.
"""
return self.execute_command(VCARD_CMD, key)

def vrem(self, key: KeyT, element: str) -> Union[Awaitable[int], int]:
"""
Remove an element from a vector set.

For more information see https://redis.io/commands/vrem
For more information, see https://redis.io/commands/vrem.
"""
return self.execute_command(VREM_CMD, key, element)

Expand All @@ -235,10 +235,10 @@ def vemb(
Get the approximated vector of an element ``element`` from vector set ``key``.

``raw`` is a boolean flag that indicates whether to return the
interal representation used by the vector.
internal representation used by the vector.


For more information see https://redis.io/commands/vembed
For more information, see https://redis.io/commands/vembe.d.
"""
options = {}
pieces = []
Expand Down Expand Up @@ -286,7 +286,7 @@ def vlinks(
If the ``WITHSCORES`` option is provided, the result is a list of dicts,
where each dict contains the neighbors for one level, with the scores as values.

For more information see https://redis.io/commands/vlinks
For more information, see https://redis.io/commands/vlinks
"""
options = {}
pieces = []
Expand All @@ -302,7 +302,7 @@ def vinfo(self, key: KeyT) -> Union[Awaitable[dict], dict]:
"""
Get information about a vector set.

For more information see https://redis.io/commands/vinfo
For more information, see https://redis.io/commands/vinfo.
"""
return self.execute_command(VINFO_CMD, key)

Expand All @@ -313,7 +313,7 @@ def vsetattr(
Associate or remove JSON attributes ``attributes`` of element ``element``
for vector set ``key``.

For more information see https://redis.io/commands/vsetattr
For more information, see https://redis.io/commands/vsetattr
"""
if attributes is None:
attributes_json = "{}"
Expand All @@ -329,12 +329,12 @@ def vgetattr(
self, key: KeyT, element: str
) -> Union[Optional[Awaitable[dict]], Optional[dict]]:
"""
Retrieve the JSON attributes of an element ``elemet`` for vector set ``key``.
Retrieve the JSON attributes of an element ``element `` for vector set ``key``.

If the element does not exist, or if the vector set does not exist, None is
returned.

For more information see https://redis.io/commands/vgetattr
For more information, see https://redis.io/commands/vgetattr.
"""
return self.execute_command(VGETATTR_CMD, key, element)

Expand All @@ -358,7 +358,7 @@ def vrandmember(

If the vector set does not exist, ``None`` is returned.

For more information see https://redis.io/commands/vrandmember
For more information, see https://redis.io/commands/vrandmember.
"""
pieces = []
pieces.append(key)
Expand Down