Skip to content

Conversation

@aveao
Copy link
Contributor

@aveao aveao commented Dec 9, 2025

Description of change

Fixes #3871.

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.

Pull Request check-list

Please make sure to review and check all of these items:

  • Do tests and lints pass with this change?
    • locally tested, yes
  • Do the CI tests pass with this change (enable it first in your forked repo and wait for the github action build to finish)?
    • Yes
  • Is the new or changed code fully tested?
    • Runs fine, and this is only typing changes
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
    • Unsure if I see any related documentation, the docstring was already correct.
  • Is there an example added to the examples folder (if applicable)?
    • Not applicable

NOTE: these things are not required to open a PR and can be done
afterwards / while the PR is open.

@jit-ci
Copy link

jit-ci bot commented Dec 9, 2025

Hi, I’m Jit, a friendly security platform designed to help developers build secure applications from day zero with an MVS (Minimal viable security) mindset.

In case there are security findings, they will be communicated to you as a comment inside the PR.

Hope you’ll enjoy using Jit.

Questions? Comments? Want to learn more? Get in touch with us.

@petyaslavova
Copy link
Collaborator

Hi @aveao, thank you for your contribution. We will review it soon.

Copy link
Collaborator

@petyaslavova petyaslavova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@petyaslavova petyaslavova merged commit 5c5bdc4 into redis:master Dec 10, 2025
72 of 73 checks passed
@aveao aveao deleted the fix/3871-zrange-type-hinting branch December 10, 2025 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Type hinting of zrange command incompatible with bylex argument

2 participants