Skip to content

Commit c90ff27

Browse files
Serene-Arcwisp3rwind
authored andcommitted
artresizer: make import conditional
1 parent 7acfe89 commit c90ff27

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

beets/util/artresizer.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,15 @@
2222
import re
2323
import subprocess
2424
from itertools import chain
25-
from typing import AnyStr, Tuple, Optional, Mapping, Union
26-
from PIL import Image
25+
from typing import AnyStr, Tuple, Optional, Mapping, Union, TYPE_CHECKING
2726
from urllib.parse import urlencode
2827

2928
from beets import logging, util
3029
from beets.util import displayable_path, get_temp_filename, syspath
3130

31+
if TYPE_CHECKING:
32+
from PIL import Image
33+
3234
PROXY_URL = "https://images.weserv.nl/"
3335

3436
log = logging.getLogger("beets")

0 commit comments

Comments
 (0)