Skip to content

Commit 1939102

Browse files
authored
Merge pull request #5990 from daveschaefer/sort-category-alphabetical2
Simplify sorting code
2 parents c39a7a6 + 1a8c9de commit 1939102

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pipenv/project.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,9 +1114,8 @@ def get_package_name_in_pipfile(self, package_name, category):
11141114
def _sort_category(self, category):
11151115
# toml tables won't maintain sorted dictionary order
11161116
# so construct the table in the order that we need
1117-
sorted_category = dict(sorted(category.items()))
11181117
table = tomlkit.table()
1119-
for key, value in sorted_category.items():
1118+
for key, value in sorted(category.items()):
11201119
table.add(key, value)
11211120

11221121
return table

0 commit comments

Comments
 (0)