style: Reformat dl_icons.py with consistent spacing

This commit is contained in:
Paul Gauthier (aider) 2025-03-24 16:23:05 -10:00
parent 5aeea0c228
commit 6c50645213

View file

@ -4,9 +4,10 @@ Download Material Design Icons SVGs used in the README and save to local assets.
"""
import os
import requests
from pathlib import Path
import requests
# Create the directory if it doesn't exist
ICONS_DIR = Path("aider/website/assets/icons")
ICONS_DIR.mkdir(parents=True, exist_ok=True)
@ -24,6 +25,7 @@ ICONS = [
"content-copy",
]
def download_icon(icon_name):
"""Download an SVG icon from Material Design Icons CDN."""
url = f"https://cdn.jsdelivr.net/npm/@mdi/svg@latest/svg/{icon_name}.svg"
@ -42,6 +44,7 @@ def download_icon(icon_name):
print(f"Saved {icon_name}.svg to {output_path}")
return True
def main():
print(f"Downloading icons to {ICONS_DIR}")
@ -52,5 +55,6 @@ def main():
print(f"Successfully downloaded {success_count}/{len(ICONS)} icons")
if __name__ == "__main__":
main()