Merge pull request #5990 from daveschaefer/sort-category-alphabetical2

Simplify sorting code
This commit is contained in:
Matt Davis
2023-10-20 20:26:28 -04:00
committed by GitHub
+1 -2
View File
@@ -1114,9 +1114,8 @@ class Project:
def _sort_category(self, category):
# toml tables won't maintain sorted dictionary order
# so construct the table in the order that we need
sorted_category = dict(sorted(category.items()))
table = tomlkit.table()
for key, value in sorted_category.items():
for key, value in sorted(category.items()):
table.add(key, value)
return table