mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-03-31 10:36:54 +00:00
Fix too long floating point number parse problem
- Also include @dougthor42's diff to test the fix
see: [his diff](https://github.com/pre-commit/pre-commit-hooks/compare/main...dougthor42:high-precision-numbers)
This commit is contained in:
parent
6b03546fc3
commit
629df55544
3 changed files with 7 additions and 2 deletions
|
|
@ -1,7 +1,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import json
|
||||
import simplejson as json
|
||||
import sys
|
||||
from difflib import unified_diff
|
||||
from typing import Mapping
|
||||
|
|
@ -23,7 +23,7 @@ def _get_pretty_format(
|
|||
after.sort()
|
||||
return dict(before + after)
|
||||
json_pretty = json.dumps(
|
||||
json.loads(contents, object_pairs_hook=pairs_first),
|
||||
json.loads(contents, object_pairs_hook=pairs_first, use_decimal=True),
|
||||
indent=indent,
|
||||
ensure_ascii=ensure_ascii,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue