-
Notifications
You must be signed in to change notification settings - Fork 53
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 JSON.ARRPOP command #2407
base: release-1.2
Are you sure you want to change the base?
Conversation
Signed-off-by: Shoham Elias <[email protected]>
b378399
to
a52ebf5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add changelog please
key: TEncodable, | ||
options: Optional[JsonArrPopOptions] = None, | ||
) -> Optional[TJsonResponse[bytes]]: | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tell how command behaves if no options given and show such examples
assert await json.set(glide_client, key, "$", json_value) == OK | ||
|
||
assert await json.arrpop( | ||
glide_client, key, JsonArrPopOptions(path="$.a", index=1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test without options
options: Optional[JsonArrPopOptions] = None, | ||
) -> Optional[TJsonResponse[bytes]]: | ||
""" | ||
Pops the last element from the array located at the specified path within the JSON document stored at `key`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remote "last"
self.path = path | ||
self.index = index | ||
|
||
def get_options(self) -> List[TEncodable]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename to toArgs
or to_args
to align with other option classes
No description provided.