[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
6d80bf563e
commit
20792c1e1f
|
@ -42,17 +42,17 @@ class FloatPreservingEncoder(json.JSONEncoder):
|
|||
):
|
||||
|
||||
if o != o:
|
||||
text = "NaN"
|
||||
text = 'NaN'
|
||||
elif o == _inf:
|
||||
text = "Infinity"
|
||||
text = 'Infinity'
|
||||
elif o == _neginf:
|
||||
text = "-Infinity"
|
||||
text = '-Infinity'
|
||||
else:
|
||||
return _repr(o)
|
||||
|
||||
if not allow_nan:
|
||||
raise ValueError(
|
||||
"Out of range float values are not JSON compliant: " + repr(o)
|
||||
'Out of range float values are not JSON compliant: ' + repr(o),
|
||||
)
|
||||
|
||||
return text
|
||||
|
|
Loading…
Reference in New Issue