diff options
| author | Dennis Fink | 2020-12-10 22:36:02 +0100 |
|---|---|---|
| committer | Dennis Fink | 2020-12-10 22:36:02 +0100 |
| commit | 877268f12a83770fe41011dd271a6d9e86421a7e (patch) | |
| tree | e9cb5f38c6926ceadb576d286cd461a04263d2cf | |
| parent | 1b251bc803fc8fa4051a9a084fd68db5b8dee2f1 (diff) | |
| download | patternutils-877268f12a83770fe41011dd271a6d9e86421a7e.tar.gz patternutils-877268f12a83770fe41011dd271a6d9e86421a7e.zip | |
Add type annotation to utils.py
| -rw-r--r-- | patternutils/utils.py | 6 |
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) |
