Skip to content

Commit 9e88585

Browse files
Gobot1234abn
andauthored
Update src/betterproto/__init__.py
Co-authored-by: Arun Babu Neelicattu <[email protected]>
1 parent 0f7307c commit 9e88585

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/betterproto/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ def _dump_float(value: float) -> Union[float, str]:
467467
return INFINITY
468468
if value == -float("inf"):
469469
return NEG_INFINITY
470-
if math.isnan(value):
470+
if isinstance(value, float) and math.isnan(value):
471471
return NAN
472472
return value
473473

0 commit comments

Comments
 (0)