-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Add support for EXPIRE command's options #2002
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2002 +/- ##
==========================================
- Coverage 92.63% 92.11% -0.53%
==========================================
Files 100 100
Lines 20921 21054 +133
==========================================
+ Hits 19381 19393 +12
- Misses 1540 1661 +121
Continue to review full report at Codecov.
|
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.
@dogukanteber If I might beg (yeah, beg!) small changes? But this is fantastically close. As always, thank you for your support!
Of course. My pleasure @chayim. |
@dogukanteber Awesome as always. I just merged master back into your branch to make sure that things play nice - and we'll get this in and ready for 4.2.0rc2. |
redis/commands/core.py
Outdated
@@ -1490,16 +1490,28 @@ def exists(self, *names: KeyT) -> ResponseT: | |||
|
|||
__contains__ = exists | |||
|
|||
def expire(self, name: KeyT, time: ExpiryT) -> ResponseT: | |||
def expire(self, name: KeyT, time: ExpiryT, option: str = None) -> ResponseT: |
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.
@dogukanteber Sorry, did I miss something? I swear I saw this PR origially including these optoins as items in the function header (i.e separate NX, XX, etc). If not... what do you think about doing that? It would match our other functions!
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.
I have pushed some changes @chayim. Does it match with other functions?
@dogukanteber I just pushed a small fix (I hope you don't mind!) so the options will be consistent with options in other functions (like set etc.), now it's ready and we'll include it in the next release, thank you! |
Pull Request check-list
Please make sure to review and check all of these items:
$ tox
pass with this change (including linting)?NOTE: these things are not required to open a PR and can be done
afterwards / while the PR is open.
Description of change
closes #1949