Skip to content

Commit ebbc7bd

Browse files
committed
fix type annotation
1 parent d16bdbc commit ebbc7bd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

package/PartSegImage/image_reader.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,9 @@ def read_resolution_from_tags(self, image_file):
592592
@staticmethod
593593
def _read_imagej_colors(
594594
image_file,
595-
) -> np.ndarray[tuple[int, int], np.dtype[np.uint8]] | list[np.ndarray[tuple[int, int], np.dtype[np.uint8]]]:
595+
) -> typing.Union[
596+
np.ndarray[tuple[int, int], np.dtype[np.uint8]], list[np.ndarray[tuple[int, int], np.dtype[np.uint8]]]
597+
]:
596598
colors = image_file.imagej_metadata.get("LUTs", [])
597599
if isinstance(colors, list) and colors and colors[0].shape[0] == 24:
598600
# drop buggy colors that comes from bug in PartSeg with

0 commit comments

Comments
 (0)