Skip to content

Commit 409cd24

Browse files
committed
fix(geo): resolve mypy type error in _build_geo_filter_expression
1 parent 38301bd commit 409cd24

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

sql_redis/translator.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,10 @@ def _build_geo_filter_expression(
416416
return f"@{alias} >= 0"
417417

418418
# Convert radius to meters if needed (geodistance() returns meters)
419+
# At this point, radius is guaranteed to be a float (BETWEEN case handled above)
420+
if isinstance(geo_cond.radius, tuple):
421+
# Shouldn't reach here, but handle gracefully
422+
return f"@{alias} >= 0"
419423
radius_m = self._convert_to_meters(geo_cond.radius, geo_cond.unit)
420424

421425
if geo_cond.operator == ">":

0 commit comments

Comments
 (0)