diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2021-03-20 13:41:02 +0100 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2021-03-20 13:42:40 +0100 |
commit | 373baece5094b5bedf10e08ea95d09be3619fd23 (patch) | |
tree | de7b6c84c3512c7a08aecf05c351936389bcdebf /generate_weemoji.py | |
parent | bf9ef6f4bcd580a9b4ba858537d0a99cae7bb87e (diff) | |
download | wee-slack-373baece5094b5bedf10e08ea95d09be3619fd23.tar.gz |
Format all python files with black
Diffstat (limited to 'generate_weemoji.py')
-rwxr-xr-x | generate_weemoji.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/generate_weemoji.py b/generate_weemoji.py index 022cd4b..a273963 100755 --- a/generate_weemoji.py +++ b/generate_weemoji.py @@ -5,15 +5,17 @@ import sys all_emojis = json.loads(sys.stdin.read()) + def convert_unicode_string(emoji_dict): for k, v in emoji_dict.items(): - if k == 'unicode': - emoji_dict[k] = ''.join([chr(int(x, 16)) for x in v.split('-')]) + if k == "unicode": + emoji_dict[k] = "".join([chr(int(x, 16)) for x in v.split("-")]) if type(v) == dict: convert_unicode_string(v) + convert_unicode_string(all_emojis) -with open('weemoji.json', 'w') as weemoji: +with open("weemoji.json", "w") as weemoji: json.dump(all_emojis, weemoji, indent=2, sort_keys=True) - weemoji.write('\n') + weemoji.write("\n") |