Fixed file so it passes the linter
This commit is contained in:
parent
44640b7e53
commit
634ac122d9
@ -1,9 +1,17 @@
|
|||||||
|
"""
|
||||||
|
Moves the descriptions of models to src/available_models_descriptions.py
|
||||||
|
so they can be translated
|
||||||
|
"""
|
||||||
|
|
||||||
import json
|
import json
|
||||||
with open('src/available_models.json', 'r') as f:
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
with open('src/available_models.json', 'r', encoding="utf-8") as f:
|
||||||
data = json.load(f)
|
data = json.load(f)
|
||||||
results = 'descriptions = {\n'
|
RESULTS = 'descriptions = {\n'
|
||||||
for key, value in data.items():
|
for key, value in data.items():
|
||||||
results += f" '{key}': _(\"{value['description']}\"),\n"
|
RESULTS += f" '{key}': _(\"{value['description']}\"),\n"
|
||||||
results += '}'
|
RESULTS += '}'
|
||||||
with open('src/available_models_descriptions.py', 'w+') as f:
|
with open('src/available_models_descriptions.py', 'w+', encoding="utf-8") as f:
|
||||||
f.write(results)
|
f.write(results)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user