Skip to content

Commit 0f2cc69

Browse files
AnneYang720dvora-h
andauthored
Add to_string method for GeoValue (#2404)
* Add to_string method for GeoValue * fix code style * simplify code Co-authored-by: dvora-h <[email protected]>
1 parent 4200d54 commit 0f2cc69

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

redis/commands/search/querystring.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,9 @@ def __init__(self, lon, lat, radius, unit="km"):
132132
self.radius = radius
133133
self.unit = unit
134134

135+
def to_string(self):
136+
return f"[{self.lon} {self.lat} {self.radius} {self.unit}]"
137+
135138

136139
class Node:
137140
def __init__(self, *children, **kwparams):

0 commit comments

Comments
 (0)