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

Python: adds ZPOPMAX command #996

Merged
merged 1 commit into from
Feb 21, 2024
Merged

Conversation

shohamazon
Copy link
Contributor

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

async def test_zpopmax(self, redis_client: TRedisClient):
key = get_random_string(10)
members_scores = {"a": 1.0, "b": 2.0, "c": 3.0}
assert await redis_client.zadd(key, members_scores=members_scores) == 3
Copy link
Collaborator

Choose a reason for hiding this comment

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

minor- why are you passing the name of the argument, members_scores=members_scores?

members_scores = {"a": 1.0, "b": 2.0, "c": 3.0}
assert await redis_client.zadd(key, members_scores=members_scores) == 3
assert await redis_client.zpopmax(key) == {"c": 3.0}

Copy link
Collaborator

Choose a reason for hiding this comment

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

remove newline

@@ -107,6 +107,7 @@ enum RequestType {
HLen = 69;
Echo = 70;
ZPopMin = 71;
ZPopMax=72;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
ZPopMax=72;
ZPopMax = 72;

Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: add a linter for protobuf files

@shohamazon shohamazon merged commit 89f9970 into valkey-io:main Feb 21, 2024
40 checks passed
@shohamazon shohamazon deleted the python/zpopmax branch February 21, 2024 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants