030bfac7e4
Apply typing to all of pre-commit-hooks
2019-01-31 20:09:15 -08:00
63cc3414e9
Updates for flake8 3.7
2019-01-30 00:15:11 -08:00
5b6ddaf9f7
Fix pretty_format_json to use int indent
...
The indent parameter for json should be integer and under Python2 is
will raise an error if not. So switch from str to int and mention
default value in help text.
2017-12-10 22:33:33 +00:00
00974efa31
Remove pretty_format_json simplejson dependency
...
* The simplejson module is only needed for <=py25 so replace with builtin json.
* Replace six dependecy for simple Py2 check for convertion to unicode.
* Cleanup quotes.
2017-12-10 22:33:33 +00:00
2a902e0a07
Use asottile/add-trailing-comma
2017-07-12 18:58:30 -07:00
dc50b7f09c
Attempt to fix the json hook under test
2017-03-20 11:25:45 -07:00
b95dcad616
Fixups
2017-03-20 08:24:58 -07:00
543c5c7e1a
Add an option to disable ensure_ascii
2017-03-20 20:19:01 +08:00
9cee71b5df
Add pyupgrade
2017-03-12 18:01:29 -07:00
84b1fb6827
let pre-commit fix some stuff
2016-11-03 15:54:48 -07:00
c7ab197645
don't need to blow away the space here
2016-11-03 15:49:04 -07:00
d06a515ce1
this is much cleaner and might actually get all the coverage with out a bunch of work
2016-11-03 15:47:21 -07:00
845a3d5bdf
adds top keys list of keys in hashes to put at the top of a hash
...
This adds custom sorting to preferencially add a list of top keys
at the start of any json hash in the json document
2016-11-03 09:41:23 -07:00
abaf0d12de
Fix exc. raising logic to match validation issues
2016-06-13 11:34:55 +02:00
a5628863e8
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.
2016-06-12 19:19:07 +02:00
17478a0a50
Style fixups
2016-04-14 08:25:52 -07:00
f775891717
Drop messy py26 support in favour of 100% coverage
2016-04-14 11:16:18 +01:00
700b18ed0e
Use OrderedDict to preserve order
2016-04-14 10:23:42 +01:00
f769c208bc
Addding no-sort-keys to pretty_format_json, this allows to disable the sort on the keys
2016-03-12 17:04:33 -05:00
55bf22dc4a
Add new hook pretty-format-json
...
This new hook allows to standardize one's JSON files (sorted key/4
spaces indent).
By default it just fails if any file is not complying with the standard,
but you can also pass the arg `--autofix` and the hook will
pretty-format the file itself.
Good in use combined with the `check-json` hook.
2015-06-11 00:08:03 -04:00