From 877268f12a83770fe41011dd271a6d9e86421a7e Mon Sep 17 00:00:00 2001 From: Dennis Fink Date: Thu, 10 Dec 2020 22:36:02 +0100 Subject: Add type annotation to utils.py --- patternutils/utils.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/patternutils/utils.py b/patternutils/utils.py index d1ccacf..14d7ddb 100644 --- a/patternutils/utils.py +++ b/patternutils/utils.py @@ -31,8 +31,10 @@ def edit(data: Dict[str, str]) -> Dict[str, str]: def json_dumps(data: Any, human_readable: bool = False) -> str: config = ( - {"indent": 4, sort_keys: True} if human_readable else {"separators": (",", ":")} - ) + {"indent": 4, "sort_keys": True} + if human_readable + else {"separators": (",", ":")} + ) # type: Dict[str, Any] return json.dumps(data, **config) -- cgit v1.3.1