Skip to content

Commit 73cb206

Browse files
committed
perf: Use operator module instead of lambda
1 parent da8b341 commit 73cb206

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

manage.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from collections import OrderedDict, defaultdict
88
from copy import deepcopy
99
from io import StringIO
10+
from operator import itemgetter
1011
from pathlib import Path
1112

1213
import click
@@ -1005,7 +1006,7 @@ def _link(name, fields, text):
10051006
if additional_fields:
10061007
click.echo(f"\nAdditional fields ({len(additional_fields)}):")
10071008
click.echo(" field,id,title")
1008-
for field, occurrences in sorted(additional_fields.items(), key=lambda item: item[1]):
1009+
for field, occurrences in sorted(additional_fields.items(), key=itemgetter(1)):
10091010
click.echo(f" {field}{''.join(f',{identifier},{title}' for identifier, title in occurrences)}")
10101011

10111012
if missing_data:

0 commit comments

Comments
 (0)