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.
2 parents 21704dd + 86ab641 commit b78ffbdCopy full SHA for b78ffbd
fileformats/core/datatype.py
@@ -263,7 +263,7 @@ def get_format(mime_name: str) -> ty.Type[DataType]:
263
f"Did not find '{class_name}' class in fileformats.{namespace} "
264
f"corresponding to MIME, or MIME-like, type {mime_string}"
265
) from None
266
- if not issubclass(klass, cls):
+ if not (ty.get_origin(klass) is ty.Union or issubclass(klass, cls)):
267
raise FormatRecognitionError(
268
f"Class '{klass}' does not inherit from '{cls}'"
269
)
0 commit comments