mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-20 12:24:59 +00:00
fix: use rounding instead of truncation for star counts
This commit is contained in:
parent
57ce2c48b8
commit
5c205cd753
1 changed files with 4 additions and 4 deletions
|
@ -209,13 +209,13 @@ def get_badges_html():
|
|||
if stars is None:
|
||||
stars_formatted = "0"
|
||||
elif stars >= 1_000_000_000:
|
||||
stars_formatted = f"{stars // 1_000_000_000}B"
|
||||
stars_formatted = f"{round(stars / 1_000_000_000)}B"
|
||||
elif stars >= 1_000_000:
|
||||
stars_formatted = f"{stars // 1_000_000}M"
|
||||
stars_formatted = f"{round(stars / 1_000_000)}M"
|
||||
elif stars >= 1_000:
|
||||
stars_formatted = f"{stars // 1_000}K"
|
||||
stars_formatted = f"{round(stars / 1_000)}K"
|
||||
else:
|
||||
stars_formatted = str(stars)
|
||||
stars_formatted = str(int(round(stars)))
|
||||
aider_percent_rounded = round(percentage)
|
||||
|
||||
# Generate HTML badges
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue