format with ruff

This commit is contained in:
2026-05-03 14:25:53 -04:00
parent 11a6abdf10
commit 6ac11cb4a8
3 changed files with 161 additions and 115 deletions
+4 -2
View File
@@ -7,13 +7,14 @@ LEAGUES = [
("hockey", "nhl"),
("football", "nfl"),
("basketball", "nba"),
("baseball", "mlb")
("baseball", "mlb"),
]
LOGO_SIZE = (16, 16)
os.makedirs("./assets/logos", exist_ok=True)
def download_logos(sport, league):
url = f"https://site.api.espn.com/apis/site/v2/sports/{sport}/{league}/teams"
resp = requests.get(url, timeout=10)
@@ -49,8 +50,9 @@ def download_logos(sport, league):
except Exception as e:
print(f"Error downloading {abbr}: {e}")
for sport, league in LEAGUES:
print(f"\nDownloading {league.upper()} logos...")
download_logos(sport, league)
print("\nDone!")
print("\nDone!")