File tree 2 files changed +4
-1
lines changed 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -86,6 +86,7 @@ h5py==3.11.0 ; python_version >= "3.8" and python_version < "3.9"
86
86
h5py==3.12.1 ; python_version >= "3.9" and python_version < "3.13"
87
87
humanfriendly==10.0 ; python_version >= "3.8" and python_version < "3.13"
88
88
idna==3.10 ; python_version >= "3.8" and python_version < "3.13"
89
+ puremagic=1.28 ; python_version >= "3.8" and python_version < "3.13"
89
90
importlib-metadata==8.5.0 ; python_version >= "3.8" and python_version < "3.13"
90
91
importlib-resources==6.4.5 ; python_version >= "3.8" and python_version < "3.9"
91
92
isa-rwval @ git+https://github.com/nsoranzo/isa-rwval.git@3d989181058d2765a93cb0e7ca85d6955e0eb6ef ; python_version >= "3.8" and python_version < "3.13"
Original file line number Diff line number Diff line change 7
7
Optional ,
8
8
)
9
9
10
+ import puremagic
11
+
10
12
try :
11
13
from PIL import Image
12
14
except ImportError :
@@ -26,7 +28,7 @@ def image_type(filename: str) -> Optional[str]:
26
28
# exception we expect to happen frequently, so we're not logging
27
29
pass
28
30
if not fmt :
29
- fmt = imghdr .what (filename )
31
+ fmt = puremagic .what (filename )
30
32
if fmt :
31
33
return fmt .upper ()
32
34
else :
You can’t perform that action at this time.
0 commit comments