From 20792c1e1f6d19a20bfeefb03c31df4483a7f999 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 18 Jan 2023 07:22:26 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- pre_commit_hooks/pretty_format_json.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pre_commit_hooks/pretty_format_json.py b/pre_commit_hooks/pretty_format_json.py index e9e18a0..a51d7a7 100644 --- a/pre_commit_hooks/pretty_format_json.py +++ b/pre_commit_hooks/pretty_format_json.py @@ -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