summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Fink2020-12-10 22:36:02 +0100
committerDennis Fink2020-12-10 22:36:02 +0100
commit877268f12a83770fe41011dd271a6d9e86421a7e (patch)
treee9cb5f38c6926ceadb576d286cd461a04263d2cf
parent1b251bc803fc8fa4051a9a084fd68db5b8dee2f1 (diff)
downloadpatternutils-877268f12a83770fe41011dd271a6d9e86421a7e.tar.gz
patternutils-877268f12a83770fe41011dd271a6d9e86421a7e.zip
Add type annotation to utils.py
Diffstat (limited to '')
-rw-r--r--patternutils/utils.py6
1 files 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)