Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
0ctagon committed Aug 28, 2024
1 parent 05113ec commit 878d0e3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/plothist/scripts/install_latin_modern_fonts.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import requests
from zipfile import ZipFile


def _download_font(url, font_directory, font_name):
"""
Download a font from a URL and save it in a directory.
Expand All @@ -31,7 +32,7 @@ def _download_font(url, font_directory, font_name):
while not success and attempt < max_attempt:
try:
r = requests.get(url)
open(f"{font_directory}/{url.split('/')[-1]}" , 'wb').write(r.content)
open(f"{font_directory}/{url.split('/')[-1]}", "wb").write(r.content)
success = True
except Exception as e:
# Print the output to the terminal
Expand Down Expand Up @@ -102,7 +103,7 @@ def install_latin_modern_fonts():
print(f"Unzipping Latin Modern {lm}...")

try:
with ZipFile(font_directory / f"latin-modern-{lm}.zip", 'r') as zip_ref:
with ZipFile(font_directory / f"latin-modern-{lm}.zip", "r") as zip_ref:
zip_ref.extractall(font_directory / f"latin-modern-{lm}")
success = True
except Exception as e:
Expand Down

0 comments on commit 878d0e3

Please sign in to comment.