mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-20 12:24:59 +00:00
style: Remove trailing whitespace and standardize string quotes
This commit is contained in:
parent
a8744708a0
commit
291c4eb258
1 changed files with 8 additions and 8 deletions
|
@ -184,7 +184,7 @@ def get_badges_html():
|
||||||
"""
|
"""
|
||||||
# Load environment variables from .env file
|
# Load environment variables from .env file
|
||||||
load_dotenv()
|
load_dotenv()
|
||||||
|
|
||||||
# Get API key from environment variable
|
# Get API key from environment variable
|
||||||
api_key = os.environ.get("PEPY_API_KEY")
|
api_key = os.environ.get("PEPY_API_KEY")
|
||||||
if not api_key:
|
if not api_key:
|
||||||
|
@ -193,23 +193,23 @@ def get_badges_html():
|
||||||
file=sys.stderr,
|
file=sys.stderr,
|
||||||
)
|
)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
# Get PyPI downloads for the default package
|
# Get PyPI downloads for the default package
|
||||||
total_downloads = get_total_downloads(api_key, "aider-chat")
|
total_downloads = get_total_downloads(api_key, "aider-chat")
|
||||||
|
|
||||||
# Get GitHub stars for the default repo
|
# Get GitHub stars for the default repo
|
||||||
stars = get_github_stars("paul-gauthier/aider")
|
stars = get_github_stars("paul-gauthier/aider")
|
||||||
|
|
||||||
# Get Aider contribution percentage in latest release
|
# Get Aider contribution percentage in latest release
|
||||||
percentage, _ = get_latest_release_aider_percentage()
|
percentage, _ = get_latest_release_aider_percentage()
|
||||||
|
|
||||||
# Format values
|
# Format values
|
||||||
downloads_formatted = format_number(total_downloads)
|
downloads_formatted = format_number(total_downloads)
|
||||||
stars_formatted = format_number(stars) if stars is not None else "0"
|
stars_formatted = format_number(stars) if stars is not None else "0"
|
||||||
aider_percent_rounded = round(percentage)
|
aider_percent_rounded = round(percentage)
|
||||||
|
|
||||||
# Generate HTML badges
|
# 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-label">⭐ GitHub Stars</span>
|
||||||
<span class="badge-value">{stars_formatted}</span>
|
<span class="badge-value">{stars_formatted}</span>
|
||||||
</a>
|
</a>
|
||||||
|
@ -228,7 +228,7 @@ def get_badges_html():
|
||||||
<a href="/HISTORY.html" class="github-badge badge-coded" title="{SINGULARITY_TOOLTIP}">
|
<a href="/HISTORY.html" class="github-badge badge-coded" title="{SINGULARITY_TOOLTIP}">
|
||||||
<span class="badge-label">🔄 Singularity</span>
|
<span class="badge-label">🔄 Singularity</span>
|
||||||
<span class="badge-value">{aider_percent_rounded}%</span>
|
<span class="badge-value">{aider_percent_rounded}%</span>
|
||||||
</a>'''
|
</a>"""
|
||||||
|
|
||||||
return html
|
return html
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue