+4
-5
lines changedFilter options
+4
-5
lines changed Original file line number Diff line number Diff line change
@@ -316,11 +316,10 @@ def _FieldToJsonObject(self, field, value):
316
316
return _INFINITY
317
317
if math.isnan(value):
318
318
return _NAN
319
-
if field.cpp_type == descriptor.FieldDescriptor.CPPTYPE_FLOAT:
320
-
if self.float_format:
321
-
return float(format(value, self.float_format))
322
-
else:
323
-
return type_checkers.ToShortestFloat(value)
319
+
if self.float_format:
320
+
return float(format(value, self.float_format))
321
+
elif field.cpp_type == descriptor.FieldDescriptor.CPPTYPE_FLOAT:
322
+
return type_checkers.ToShortestFloat(value)
324
323
325
324
return value
326
325
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4