You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The docs say that the way to get Redis version 6 compatibility is to say version=6, but the type hint is version: Tuple[int, ...] = (7,)
Passing an integer does work, because _create_version handles ints, strings, or tuples. Again though its type hint is just the tuple.
It's quite verbose, but I think the correct type is Union[Tuple[int, ...], int, str]
If this is intentional, as a way to move people towards specifying the tuple, then fair enough and I withdraw my claim. Although in that case the docs should say to pass the tuple :-)
Upvote & Fund
We're using Polar.sh so you can upvote and help fund this issue.
We receive the funding once the issue is completed & confirmed by you.
Thank you in advance for helping prioritize & fund our backlog.
The text was updated successfully, but these errors were encountered:
FYI, I think if you add enough strictness to mypy then with the old type hint it would have complained that if isinstance(v, int) introduces dead code, since it's "impossible". Thus you can catch type hints that are more restrictive than intended. But of course making mypy stricter tends to be an exercise across the whole code base.
Describe the bug
The docs say that the way to get Redis version 6 compatibility is to say
version=6
, but the type hint isversion: Tuple[int, ...] = (7,)
Passing an integer does work, because
_create_version
handles ints, strings, or tuples. Again though its type hint is just the tuple.It's quite verbose, but I think the correct type is
Union[Tuple[int, ...], int, str]
If this is intentional, as a way to move people towards specifying the tuple, then fair enough and I withdraw my claim. Although in that case the docs should say to pass the tuple :-)
Upvote & Fund
The text was updated successfully, but these errors were encountered: