From 75b714a1ad3e6e3de81c56e3cddc480639c29061 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Wed, 26 Mar 2025 06:47:40 -1000 Subject: [PATCH] fix: Resolve flake8 errors in generate_celebration_image.py --- generate_celebration_image.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/generate_celebration_image.py b/generate_celebration_image.py index f8b6e67c1..c9eaa40ae 100644 --- a/generate_celebration_image.py +++ b/generate_celebration_image.py @@ -15,6 +15,8 @@ OUTPUT_FILENAME = "aider_30k_stars_celebration.svg" # Font families - SVG will try these in order. Ensure viewers have suitable fonts. FONT_FAMILY_BOLD = "'DejaVu Sans Bold', 'Arial Bold', 'Helvetica Bold', sans-serif-bold, sans-serif" FONT_FAMILY_REGULAR = "'DejaVu Sans', 'Arial', 'Helvetica', sans-serif" +# Use Bold for Medium as per original Pillow logic attempt +FONT_FAMILY_MEDIUM = FONT_FAMILY_BOLD # --- Paths (Adjust if needed) --- # Assumes the script is run from the root of the aider repo @@ -99,12 +101,15 @@ svg_elements.append( # Combine into final SVG svg_content = f"""\ - + @@ -131,7 +137,3 @@ try: print(f"Celebration SVG image saved as '{OUTPUT_FILENAME}'") except Exception as e: print(f"Error saving SVG image: {e}") - -# --- Define Font Families Used in Text Elements --- -# These need to match the font-family attributes used in the tags -FONT_FAMILY_MEDIUM = FONT_FAMILY_BOLD # Using Bold for Medium as per original Pillow logic attempt