Skip to content
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

Fix typing for address_remap (fixes #3234) #3235

Merged
merged 1 commit into from
May 21, 2024

Conversation

daveisfera
Copy link
Contributor

This is just a typing change so it shouldn't impact the functionality of the code

@gerzse gerzse added the maintenance Maintenance (CI, Releases, etc) label May 20, 2024
@gerzse
Copy link
Contributor

gerzse commented May 20, 2024

@daveisfera Thanks for this!

The CI fails on Python 3.8: TypeError: Callable[args, result]: args must be a list. Got typing.Tuple[str, int].

Also from the docs at https://docs.python.org/3/library/typing.html#annotating-callable-objects

The subscription syntax must always be used with exactly two values: the argument list and the return type. The argument list must be a list of types, a ParamSpec, Concatenate, or an ellipsis. The return type must be a single type.

Maybe the accurate way to spell it is: Callable[[Tuple[str, int]], Tuple[str, int]]?

@daveisfera
Copy link
Contributor Author

You're right. I forgot to put the Tuple in a list, so that's fixed now

@gerzse gerzse merged commit 9a70f62 into redis:master May 21, 2024
46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Maintenance (CI, Releases, etc)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants