Skip to content

Commit 9969773

Browse files
committed
[FIX] remove import statments that make java a non-optional dependency
if TYPE_CHECKING: from ashlar.reg import EdgeAligner, Mosaic Is always removed by ruff linter. Removing the return types and the import statements to ensure that java dependency is only required for the stitching code.
1 parent eef85cf commit 9969773

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/scportrait/tools/stitch/_stitch.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
mmap_array_from_path,
1919
redefine_temp_location,
2020
)
21-
from ashlar.reg import EdgeAligner, Mosaic
2221
from tqdm import tqdm
2322

2423
from scportrait.io.daskmmap import dask_array_from_path
@@ -330,7 +329,7 @@ def generate_thumbnail(self, scale: float | None = 0.05) -> None:
330329
if rescale:
331330
self.thumbnail = rescale_image(self.thumbnail, rescale_range)
332331

333-
def _initialize_aligner(self) -> EdgeAligner:
332+
def _initialize_aligner(self):
334333
"""Initialize the aligner for aligning the image tiles.
335334
336335
Returns:
@@ -370,7 +369,7 @@ def _perform_alignment(self):
370369

371370
print("Alignment complete.")
372371

373-
def _initialize_mosaic(self) -> Mosaic:
372+
def _initialize_mosaic(self):
374373
"""Initialize the mosaic object for assembling the image tiles.
375374
376375
Returns:

0 commit comments

Comments
 (0)