From 93d62c5345a22e3967498a228d20a858456ca565 Mon Sep 17 00:00:00 2001 From: Wim Pomp Date: Wed, 2 Oct 2024 14:03:36 +0200 Subject: [PATCH] - make type aliases compatible with python 3.10 --- pyproject.toml | 2 +- tiffwrite/__init__.py | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index dd29aba..2db2f95 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "tiffwrite" -version = "2024.10.0" +version = "2024.10.1" description = "Parallel tiff writer compatible with ImageJ." authors = ["Wim Pomp, Lenstra lab NKI "] license = "GPL-3.0-or-later" diff --git a/tiffwrite/__init__.py b/tiffwrite/__init__.py index 65d9660..e4c0d1e 100755 --- a/tiffwrite/__init__.py +++ b/tiffwrite/__init__.py @@ -31,9 +31,8 @@ except Exception: # noqa __version__ = "unknown" -type Strip = tuple[list[int], list[int]] -type CZT = tuple[int, int, int] -type FrameInfo = tuple[IFD, Strip, CZT] +Strip = tuple[list[int], list[int]] +CZT = tuple[int, int, int] def tiffwrite(file: str | Path, data: np.ndarray, axes: str = 'TZCXY', dtype: DTypeLike = None, bar: bool = False, @@ -350,6 +349,9 @@ class IFD(dict): return new +FrameInfo = tuple[IFD, Strip, CZT] + + class IJTiffFile: """ Writes a tiff file in a format that the BioFormats reader in Fiji understands. file: filename of the new tiff file