mirror of
https://github.com/beetbox/beets.git
synced 2025-12-30 04:22:40 +01:00
Fix variable names
This commit is contained in:
parent
5c41a9e767
commit
f2f18d9d56
2 changed files with 9 additions and 5 deletions
|
|
@ -349,8 +349,10 @@ class Distance(object):
|
|||
# Convert distance into a negative float we can sort items in
|
||||
# ascending order (for keys, when the penalty is equal) and
|
||||
# still get the items with the biggest distance first.
|
||||
return sorted(list_,
|
||||
key=lambda key_dist: (0 - key_dist[1], key_dist[0]))
|
||||
return sorted(
|
||||
list_,
|
||||
key=lambda key_and_dist: (-key_and_dist[1], key_and_dist[0])
|
||||
)
|
||||
|
||||
# Behave like a float.
|
||||
|
||||
|
|
|
|||
|
|
@ -280,7 +280,7 @@ def show_change(cur_artist, cur_album, match):
|
|||
|
||||
# Tracks.
|
||||
pairs = match.mapping.items()
|
||||
pairs.sort(key=lambda __track_info: __track_info[1].index)
|
||||
pairs.sort(key=lambda item_and_track_info: item_and_track_info[1].index)
|
||||
|
||||
# Build up LHS and RHS for track difference display. The `lines` list
|
||||
# contains ``(lhs, rhs, width)`` tuples where `width` is the length (in
|
||||
|
|
@ -441,8 +441,10 @@ def summarize_items(items, singleton):
|
|||
summary_parts.append(items[0].format)
|
||||
else:
|
||||
# Enumerate all the formats by decreasing frequencies:
|
||||
for fmt, count in sorted(format_counts.items(),
|
||||
key=lambda f_c: (-f_c[1], f_c[0])):
|
||||
for fmt, count in sorted(
|
||||
format_counts.items(),
|
||||
key=lambda fmt_and_count: (-fmt_and_count[1], fmt_and_count[0])
|
||||
):
|
||||
summary_parts.append('{0} {1}'.format(fmt, count))
|
||||
|
||||
if items:
|
||||
|
|
|
|||
Loading…
Reference in a new issue