fix: Add missing math import in 30k-image.py

This commit is contained in:
Paul Gauthier (aider) 2025-03-26 07:01:51 -10:00
parent 7b97f93051
commit 999eb86d7a

View file

@ -6,6 +6,7 @@ This creates a shareable social media graphic with confetti animation.
import argparse import argparse
import base64 import base64
import math
import os import os
import random import random
from pathlib import Path from pathlib import Path
@ -100,8 +101,6 @@ def generate_confetti(count=150, width=DEFAULT_WIDTH, height=DEFAULT_HEIGHT):
def generate_celebration_svg(output_path=None, width=DEFAULT_WIDTH, height=DEFAULT_HEIGHT): def generate_celebration_svg(output_path=None, width=DEFAULT_WIDTH, height=DEFAULT_HEIGHT):
"""Generate a celebratory SVG for 30K GitHub stars.""" """Generate a celebratory SVG for 30K GitHub stars."""
# Import math here to avoid the error in generate_confetti
import math
# Font embedding # Font embedding
font_data = embed_font() font_data = embed_font()