Download:
child 331:200bc73690c7
parent 329:6e89b4cea984
330:ca5eed415a48
Anton Shestakov <av6@dwimlabs.net>, Tue, 28 Nov 2017 13:45:40 +0800
viewer: sort codes (count DESC, name ASC), and do it right

1 файлов изменено, 1 вставок(+), 1 удалений(-) [+]
candolint/handlers.py file | annotate | diff | comparison | revisions
--- a/candolint/handlers.py Tue Nov 28 12:16:02 2017 +0800
+++ b/candolint/handlers.py Tue Nov 28 13:45:40 2017 +0800
@@ -231,7 +231,7 @@
codes = {
kind: [
{'code': k, 'count': v['count'], 'line': v['line']}
- for k, v in sorted(codes[kind].items(), key=lambda i: (i[1], i[0]), reverse=True)
+ for k, v in sorted(codes[kind].items(), key=lambda i: (-i[1]['count'], i[0]))
] for kind in codes
}
return files, codes