History

scripts/bloat-o-meter: use the reverse flag for sort

The sort function has the inbuilt reversal option. We can use it to save some time.

Alexander Pantyukhin committed 3 years ago

Commit 0371ba61 parent e36903b1 file · +1 −2Browse files

Showing the changes to scripts (1 of 1 file). Show all

Unified · Split

scripts/bloat-o-meter+1−2
@@ -80,8 +80,7 @@ def calc(oldfile, newfile, format): · 79 unmodified lines
8080 if d<0: shrink, down = shrink+1, down-d
8181 delta.append((d, name))
8282
83− delta.sort()
84− delta.reverse()
83+ delta.sort(reverse=True)
8584 return grow, shrink, add, remove, up, down, delta, old, new, otot, ntot
8685
8786 def print_result(symboltype, symbolformat):

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t