diff --git a/dlup/backends/tifffile_backend.py b/dlup/backends/tifffile_backend.py index 3d38a9a9..5ff91c62 100644 --- a/dlup/backends/tifffile_backend.py +++ b/dlup/backends/tifffile_backend.py @@ -1,4 +1,5 @@ # Copyright (c) dlup contributors +# mypy: disable-error-code="union-attr" from typing import Any import numpy as np @@ -46,7 +47,6 @@ def __parse_tifffile(self) -> None: for idx, page in enumerate(self._image.pages): self._shapes.append((page.shape[1], page.shape[0])) - # TODO: The order of the x and y tag need to be verified x_res = page.tags["XResolution"].value x_res = x_res[0] / x_res[1] y_res = page.tags["YResolution"].value diff --git a/examples/annotations_to_mask.py b/examples/annotations_to_mask.py index 06af112e..f47b2c56 100644 --- a/examples/annotations_to_mask.py +++ b/examples/annotations_to_mask.py @@ -1,5 +1,5 @@ # Copyright (c) dlup contributors -# pylint: disable=no-member +# mypy: disable-error-code="attr-defined" """This code provides an example of how to convert annotations to a mask.""" from pathlib import Path @@ -11,7 +11,6 @@ def convert_annotations_to_mask() -> None: scaling = 0.02 annotations = SlideAnnotations.from_dlup_xml(Path(__file__).parent / "files" / "dlup_annotation_test.xml") - bbox = annotations.bounding_box_at_scaling(scaling) region = annotations.read_region((0, 0), scaling, bbox[1]) diff --git a/pyproject.toml b/pyproject.toml index b20e483e..14f85aad 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,7 +34,7 @@ classifiers = [ dependencies = [ "numpy==1.26.4", "tifftools>=1.5.2", - "tifffile>=2024.7.2", + "tifffile>=2024.9.20", "pyvips>=2.2.3", "tqdm>=2.66.4", "pillow>=10.3.0",