Repository: redis/redis-py
File: redis/commands/vectorset/commands.py (Python)

Code before:
                    Union[
                        List[EncodableT],
                        Dict[EncodableT, Number],
                        Dict[EncodableT, Dict[str, Any]],
                    ]
                ]
            ]
        ],
        Optional[
            List[
                Union[
                    List[EncodableT],
                    Dict[EncodableT, Number],
                    Dict[EncodableT, Dict[str, Any]],
                ]
            ]
        ],
    ]:
        """
        Compare a vector or element ``input``  with the other vectors in a vector set ``key``.

        ``with_scores`` sets if returns, for each element, the JSON attribute associated
        with the element or None when no attributes are present.

        ``with_attribs`` sets if the results should be returned with the
                attributes of the elements in the result.

        ``count`` sets the number of results to return.

        ``ef`` sets the exploration factor.

        ``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 a linear scan.

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

        ``epsilon`` floating point between 0 and 1, if specified will return
                only elements with distance no further than the specified one.

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

        if not input:
            raise DataError("'input' should be provided")

        pieces = []
        options = {}

Review comment (bug):
This line continues the incorrect documentation for `with_scores`. This description belongs to the `with_attribs` parameter documentation.
```suggestion
        ``with_scores`` sets if the results should be returned with the scores of the elements in the result.

        ``with_attribs`` sets if the results should be returned with the
                attributes of the elements in the result, or None when no attributes are present.
```

Code after:
        filter: Optional[str] = None,
        filter_ef: Optional[str] = None,
        truth: Optional[bool] = False,
        no_thread: Optional[bool] = False,
        epsilon: Optional[Number] = None,
    ) -> Union[Awaitable[VSimResult], VSimResult]:
        """
        Compare a vector or element ``input``  with the other vectors in a vector set ``key``.

        ``with_scores`` sets if similarity scores should be returned for each element in the result.

        ``with_attribs`` ``with_attribs`` sets if the results should be returned with the
                attributes of the elements in the result, or None when no attributes are present.

        ``count`` sets the number of results to return.

        ``ef`` sets the exploration factor.

        ``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 a linear scan.

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

        ``epsilon`` floating point between 0 and 1, if specified will return
                only elements with distance no further than the specified one.

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

        if not input:
            raise DataError("'input' should be provided")

        pieces = []
        options = {}

        if isinstance(input, bytes):
            pieces.extend(["FP32", input])
        elif isinstance(input, list):
            pieces.extend(["VALUES", len(input)])
            pieces.extend(input)
        else:
            pieces.extend(["ELE", input])

        if with_scores or with_attribs:
            if get_protocol_version(self.client) in ["3", 3]:
                options[CallbacksOptions.RESP3.value] = True