Skip to content

Commit b95dcad

Browse files
committed
Fixups
1 parent 4c3cc8f commit b95dcad

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
- repo: https://github.com/pre-commit/pre-commit-hooks
2-
sha: v0.7.0
2+
sha: 4c3cc8f3edc3c673b3a4abe2054e64f21d26772c
33
hooks:
44
- id: trailing-whitespace
55
- id: end-of-file-fixer

pre_commit_hooks/pretty_format_json.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ def pairs_first(pairs):
2323
object_pairs_hook=pairs_first,
2424
),
2525
indent=indent,
26-
ensure_ascii=ensure_ascii
27-
)) + "\n" # dumps don't end with a newline
26+
ensure_ascii=ensure_ascii,
27+
)) + "\n" # dumps does not end with a newline
2828

2929

3030
def _autofix(filename, new_contents, encoding=None):
@@ -106,7 +106,7 @@ def pretty_format_json(argv=None):
106106
try:
107107
pretty_contents = _get_pretty_format(
108108
contents, args.indent, ensure_ascii=not args.no_ensure_ascii,
109-
sort_keys=not args.no_sort_keys, top_keys=args.top_keys
109+
sort_keys=not args.no_sort_keys, top_keys=args.top_keys,
110110
)
111111

112112
if contents != pretty_contents:
@@ -115,7 +115,7 @@ def pretty_format_json(argv=None):
115115
if args.autofix:
116116
_autofix(
117117
json_file, pretty_contents,
118-
encoding='utf-8' if args.no_ensure_ascii else None
118+
encoding='utf-8' if args.no_ensure_ascii else None,
119119
)
120120

121121
status = 1

0 commit comments

Comments
 (0)