mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-04 19:26:52 +00:00
Refactor legacy indent: int -> indent: str
The type of `indent` parameter is preferably `str`. See http://simplejson.readthedocs.io/en/latest/index.html?highlight=dump#simplejson.dump . This change allows to specify TABs as indentation delimiter to `pretty_format_json`. Add input validator/converter for backward compat.
This commit is contained in:
parent
6f2b0a27e5
commit
a5628863e8
3 changed files with 53 additions and 3 deletions
9
testing/resources/tab_pretty_formatted_json.json
Normal file
9
testing/resources/tab_pretty_formatted_json.json
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"alist": [
|
||||
2,
|
||||
34,
|
||||
234
|
||||
],
|
||||
"blah": null,
|
||||
"foo": "bar"
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue