-
-
Notifications
You must be signed in to change notification settings - Fork 429
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 the set functions from issue #597 #743
Conversation
988701b
to
1a8870f
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #743 +/- ##
========================================
+ Coverage 61.5% 63.3% +1.8%
========================================
Files 43 43
Lines 2786 3215 +429
Branches 161 244 +83
========================================
+ Hits 1713 2034 +321
- Misses 1060 1164 +104
- Partials 13 17 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
Terrific job!
I just have a couple of questions on typing, but apart from that this PR looks great.
P.S. sorry for stepping on your foot for pre-commit and ruff, I opted to merge the pre-commit autoupdate instead of different PRs
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.
when returning a Set
can we have the container type as well?
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.
Sure, I somehow missed that. I don't see a clear way how we can use generics or have better type support rather than Set[Any]
for the results. Do you have other suggestions?
django_redis/client/default.py
Outdated
if result is None: | ||
return None | ||
if isinstance(result, list): | ||
return {self.decode(value) for value in result} | ||
return self.decode(result) |
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.
could we have an utility method for this?
Co-authored-by: Ali Rezaei <[email protected]>
@WisdomPill I took over some work that was already done here #654. Will appreciate your support in reviewing it.