Skip to content

Commit

Permalink
Fix missing imports
Browse files Browse the repository at this point in the history
  • Loading branch information
bbye98 committed Aug 20, 2024
1 parent b7bc655 commit f1febba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/minim/audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@

if FOUND_FFMPEG:
from . import FFMPEG_CODECS
FOUND_PILLOW = find_spec("PIL") is not None
if (FOUND_PILLOW = find_spec("PIL") is not None):
from PIL import Image

__all__ = ["Audio", "FLACAudio", "MP3Audio", "MP4Audio", "OggAudio", "WAVEAudio"]

Expand Down
6 changes: 4 additions & 2 deletions src/minim/utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
from importlib.util import find_spec
from typing import Any, Union

FOUND_LEVENSHTEIN = find_spec("Levenshtein") is not None
FOUND_NUMPY = find_spec("numpy") is not None
if (FOUND_LEVENSHTEIN := find_spec("Levenshtein") is not None):
import Levenshtein
if (FOUND_NUMPY := find_spec("numpy") is not None):
import numpy as np

__all__ = ["format_multivalue", "gestalt_ratio", "levenshtein_ratio"]

Expand Down

0 comments on commit f1febba

Please sign in to comment.