style: Remove trailing whitespace and standardize string quotes

This commit is contained in:
Paul Gauthier (aider) 2025-03-20 14:23:07 -07:00
parent a8744708a0
commit 291c4eb258

View file

@ -184,7 +184,7 @@ def get_badges_html():
"""
# Load environment variables from .env file
load_dotenv()
# Get API key from environment variable
api_key = os.environ.get("PEPY_API_KEY")
if not api_key:
@ -193,23 +193,23 @@ def get_badges_html():
file=sys.stderr,
)
sys.exit(1)
# Get PyPI downloads for the default package
total_downloads = get_total_downloads(api_key, "aider-chat")
# Get GitHub stars for the default repo
stars = get_github_stars("paul-gauthier/aider")
# Get Aider contribution percentage in latest release
percentage, _ = get_latest_release_aider_percentage()
# Format values
downloads_formatted = format_number(total_downloads)
stars_formatted = format_number(stars) if stars is not None else "0"
aider_percent_rounded = round(percentage)
# Generate HTML badges
html = f'''<a href="https://github.com/Aider-AI/aider" class="github-badge badge-stars" title="{GITHUB_STARS_TOOLTIP}">
html = f"""<a href="https://github.com/Aider-AI/aider" class="github-badge badge-stars" title="{GITHUB_STARS_TOOLTIP}">
<span class="badge-label"> GitHub Stars</span>
<span class="badge-value">{stars_formatted}</span>
</a>
@ -228,7 +228,7 @@ def get_badges_html():
<a href="/HISTORY.html" class="github-badge badge-coded" title="{SINGULARITY_TOOLTIP}">
<span class="badge-label">🔄 Singularity</span>
<span class="badge-value">{aider_percent_rounded}%</span>
</a>'''
</a>"""
return html