python: Reformat with Black, except quotes.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2021-02-11 23:19:30 -08:00
committed by Tim Abbott
parent 5028c081cb
commit 11741543da
817 changed files with 44952 additions and 24860 deletions

View File

@@ -9,6 +9,7 @@ from typing import Dict, List
def get_json_filename(locale: str) -> str:
return f"locale/{locale}/mobile.json"
def get_locales() -> List[str]:
output = check_output(['git', 'ls-files', 'locale'], universal_newlines=True)
tracked_files = output.split()
@@ -21,6 +22,7 @@ def get_locales() -> List[str]:
return locales
def get_translation_stats(resource_path: str) -> Dict[str, int]:
with open(resource_path) as raw_resource_file:
raw_info = json.load(raw_resource_file)
@@ -29,6 +31,7 @@ def get_translation_stats(resource_path: str) -> Dict[str, int]:
not_translated = len([i for i in raw_info.items() if i[1] == ''])
return {'total': total, 'not_translated': not_translated}
translation_stats: Dict[str, Dict[str, int]] = {}
locale_paths = [] # List[str]
for locale in get_locales():