Skip to content

Type hinting of zrange command incompatible with bylex argument #3871

@aveao

Description

@aveao

In this code here: https://github.com/redis/redis-py/blob/v7.1.0/redis/commands/core.py#L4738-L4778

start/end are type hinted as int only, whereas when bylex (or byscore) is set to True, the value is expected to be prepended with [ or (, as stated both in the function's docstring and redis docs.

This can only be done if start/end are passed as a string or as bytes.

The hinting should be likely EncodableT.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions