From 0f2cc69ec2558f8a30d2d41b74a70d97d987f3d1 Mon Sep 17 00:00:00 2001 From: Anne Yang Date: Tue, 25 Oct 2022 23:11:46 +0800 Subject: Add to_string method for GeoValue (#2404) * Add to_string method for GeoValue * fix code style * simplify code Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com> --- redis/commands/search/querystring.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/redis/commands/search/querystring.py b/redis/commands/search/querystring.py index 1da0387..3ff1320 100644 --- a/redis/commands/search/querystring.py +++ b/redis/commands/search/querystring.py @@ -132,6 +132,9 @@ class GeoValue(Value): self.radius = radius self.unit = unit + def to_string(self): + return f"[{self.lon} {self.lat} {self.radius} {self.unit}]" + class Node: def __init__(self, *children, **kwparams): -- cgit v1.2.1