-
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 to_string method for GeoValue #2404
Conversation
Codecov ReportBase: 78.91% // Head: 92.02% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #2404 +/- ##
===========================================
+ Coverage 78.91% 92.02% +13.11%
===========================================
Files 110 110
Lines 28735 28737 +2
===========================================
+ Hits 22675 26446 +3771
+ Misses 6060 2291 -3769
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
redis/commands/search/querystring.py
Outdated
return "[{0} {1} {2} {3}]".format( | ||
self.lon, | ||
self.lat, | ||
self.radius, | ||
self.unit | ||
) |
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.
This would be more succinct as an f-string:
return "[{0} {1} {2} {3}]".format( | |
self.lon, | |
self.lat, | |
self.radius, | |
self.unit | |
) | |
return f"[{self.lon} {self.lat} {self.radius} {self.unit}]" |
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
Add to_string method for GeoValue. The lack of to_string will cause NotImplementedError when building query string from Nodes.