From 545c711244ec85fa5bae56d8b148fc845534235c Mon Sep 17 00:00:00 2001 From: Victorsitou <67214928+Victorsitou@users.noreply.github.com> Date: Tue, 18 Jan 2022 00:49:53 -0300 Subject: [PATCH] `new_line` on `_get_pretty_format` is now True by default. --- pre_commit_hooks/.json | 3 --- pre_commit_hooks/pretty_format_json.py | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) delete mode 100644 pre_commit_hooks/.json diff --git a/pre_commit_hooks/.json b/pre_commit_hooks/.json deleted file mode 100644 index 00c0340..0000000 --- a/pre_commit_hooks/.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "name": "victor" -} \ No newline at end of file diff --git a/pre_commit_hooks/pretty_format_json.py b/pre_commit_hooks/pretty_format_json.py index c87e296..0f5fd72 100644 --- a/pre_commit_hooks/pretty_format_json.py +++ b/pre_commit_hooks/pretty_format_json.py @@ -14,7 +14,7 @@ def _get_pretty_format( ensure_ascii: bool = True, sort_keys: bool = True, top_keys: Sequence[str] = (), - new_line: bool = False, + new_line: bool = True, ) -> str: def pairs_first(pairs: Sequence[tuple[str, str]]) -> Mapping[str, str]: before = [pair for pair in pairs if pair[0] in top_keys]