Skip to content

Commit

Permalink
sort key count
Browse files Browse the repository at this point in the history
  • Loading branch information
MeetWq committed Aug 14, 2024
1 parent 8d865db commit 76d2a61
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions nonebot_plugin_memes_api/matchers/statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ def fmt_time(time: datetime) -> str:
key_counts: dict[str, int] = {}
for key in meme_keys:
key_counts[key] = key_counts.get(key, 0) + 1
key_counts = dict(sorted(key_counts.items(), key=lambda item: item[1]))

if meme:
title = (
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "nonebot_plugin_memes_api"
version = "0.4.4"
version = "0.4.5"
description = "Nonebot2 plugin for making memes"
authors = ["meetwq <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit 76d2a61

Please sign in to comment.