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