diff options
author | Stefan Behnel <stefan_ml@behnel.de> | 2023-05-10 15:49:00 +0200 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2023-05-10 15:49:00 +0200 |
commit | e3ef31814f822f86e831d6c66020b3421462fc32 (patch) | |
tree | 98f617b4275eb534776a0892102c63a77f7d3c18 | |
parent | 932dff3f59a000084ad89807c6e3d27ad0631fe6 (diff) | |
download | python-lxml-e3ef31814f822f86e831d6c66020b3421462fc32.tar.gz |
pypistats: Reverse category output to make possible cut-offs visible.
-rw-r--r-- | tools/pypistats.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/pypistats.py b/tools/pypistats.py index 4ba7a5c3..31cbc9e0 100644 --- a/tools/pypistats.py +++ b/tools/pypistats.py @@ -47,7 +47,7 @@ def print_agg_stats(stats, sort_key=None): total = sum(stats.values()) max_len = max(len(category) for category in stats) agg_sum = 0.0 - for category, count in sorted(stats.items(), key=sort_key): + for category, count in sorted(stats.items(), key=sort_key, reverse=True): agg_sum += count print(f" {category:{max_len}}: {count:-12.1f} / day ({agg_sum / total * 100:-5.1f}%)") |