Skip to content

Commit

Permalink
Correct conversion of float to string
Browse files Browse the repository at this point in the history
  • Loading branch information
khanxmetu authored Sep 4, 2024
1 parent a484173 commit 0eccad1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion normality/stringify.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ def stringify(
return _clean_empty(value)
if isinstance(value, (date, datetime)):
return value.isoformat()
elif isinstance(value, (float, Decimal)):
elif isinstance(value, float):
return str(value)
elif isinstance(value, Decimal):
return Decimal(value).to_eng_string()
elif isinstance(value, bytes):
if encoding is None:
Expand Down

0 comments on commit 0eccad1

Please sign in to comment.