We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 41db61b commit a887d63Copy full SHA for a887d63
fileformats/core/identification.py
@@ -128,11 +128,11 @@ def to_mime(
128
namespace scheme instead of putting all non-standard types into the 'application'
129
registry if not
130
"""
131
- if not issubclass(datatype, fileformats.core.FileSet):
+ origin = ty.get_origin(datatype)
132
+ if origin is None and not issubclass(datatype, fileformats.core.DataType):
133
raise TypeError(
134
f"Cannot convert {datatype} to mime-type as it is not a file-set class"
135
)
- origin = ty.get_origin(datatype)
136
if official and (origin or datatype.namespace == "field"):
137
138
f"Cannot convert {datatype} to official mime-type as it is not a proper "
0 commit comments