mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
Merge pull request #5990 from daveschaefer/sort-category-alphabetical2
Simplify sorting code
This commit is contained in:
+1
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user