Skip to content

Commit

Permalink
Update versions, fix new mypy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasteuwen committed Sep 26, 2024
1 parent 37443a6 commit 1dbc5ea
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dlup/backends/tifffile_backend.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Copyright (c) dlup contributors
# mypy: disable-error-code="union-attr"
from typing import Any

import numpy as np
Expand Down Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions examples/annotations_to_mask.py
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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])
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 1dbc5ea

Please sign in to comment.