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 @@ -133,6 +133,7 @@ propcache==0.2.0 ; python_version >= "3.8" and python_version < "3.13"
133
133
prov==1.5.1 ; python_version >= "3.8" and python_version < "3.13"
134
134
psutil==6.1.0 ; python_version >= "3.8" and python_version < "3.13"
135
135
pulsar-galaxy-lib==0.15.6 ; python_version >= "3.8" and python_version < "3.13"
136
+ puremagic==1.28 ; python_version >= "3.8" and python_version < "3.13"
136
137
pycparser==2.22 ; python_version >= "3.8" and python_version < "3.13"
137
138
pycryptodome==3.21.0 ; python_version >= "3.8" and python_version < "3.13"
138
139
pydantic-core==2.23.4 ; 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