Skip to content

Commit ae86a7f

Browse files
authored
Merge pull request #124 from ArcanaFramework/to_mime-bugfix
handle types.Union as well as typing.Union in from_paths
2 parents f1b6fa7 + 5a945e1 commit ae86a7f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fileformats/core/identification.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ def from_paths(
225225
unwrapped = []
226226

227227
def unwrap(candidate: ty.Type["fileformats.core.FileSet"]) -> None:
228-
if ty.get_origin(candidate) is ty.Union:
228+
if is_union(candidate):
229229
arg: ty.Type["fileformats.core.FileSet"]
230230
for arg in ty.get_args(candidate):
231231
unwrap(arg)

0 commit comments

Comments
 (0)