Skip to content

Commit fa032e1

Browse files
committed
uncommented list mime handling
1 parent b443500 commit fa032e1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

fileformats/core/identification.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -149,12 +149,12 @@ def to_mime(
149149
f"Cannot convert {datatype} to official mime-type as it is not a proper "
150150
'file-type, please use official=False to convert to "mime-like" string instead'
151151
)
152-
# if origin is list:
153-
# item_mime = to_mime(ty.get_args(datatype)[0], official=official)
154-
# if "," in item_mime:
155-
# item_mime = "[" + item_mime + "]"
156-
# item_mime += LIST_MIME
157-
# return item_mime
152+
if origin is list:
153+
item_mime = to_mime(ty.get_args(datatype)[0], official=official)
154+
if "," in item_mime:
155+
item_mime = "[" + item_mime + "]"
156+
item_mime += LIST_MIME
157+
return item_mime
158158
if is_union(datatype):
159159
return ",".join(to_mime(t, official=official) for t in ty.get_args(datatype))
160160
if (

0 commit comments

Comments
 (0)