Files
default/scripts/is_sorted.py
T
Joakim Sørensen 472bc4a2e3 Sorting (#302)
* Sorting

* Fix typo
2020-03-29 12:45:14 +02:00

10 lines
367 B
Python

import json
categories = ["blacklist", "appdaemon", "integration", "netdaemon", "plugin", "python_script", "theme"]
for category in categories:
with open(category, "r") as cat_file:
content = json.loads(cat_file.read())
if content != sorted(content, key=str.casefold):
print(f"{category} is not sorted correctly")
exit(1)