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 6983002 commit 0a6a62fCopy full SHA for 0a6a62f
fileformats/core/fileset.py
@@ -4,6 +4,7 @@
4
import inspect
5
import itertools
6
import logging
7
+import operator
8
import os
9
import shutil
10
import struct
@@ -707,8 +708,8 @@ def add_concrete(datatype: ty.Type[DataType]) -> None:
707
708
for datatype in datatypes:
709
add_concrete(datatype)
710
# TODO: Might want to sort datatypes in a more specific order
- return ty.Union.__getitem__( # pyright: ignore[reportAttributeAccessIssue]
711
- tuple(sorted(concrete_datatypes, key=union_sort_key))
+ return functools.reduce(
712
+ operator.or_, sorted(concrete_datatypes, key=union_sort_key)
713
) # type: ignore[return-value]
714
715
@classmethod
0 commit comments