[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2023-01-18 07:22:26 +00:00
parent 6d80bf563e
commit 20792c1e1f
1 changed files with 4 additions and 4 deletions

View File

@ -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