Skip to content

Commit 0a266cb

Browse files
committed
Silence mypy warning about mismatch types
1 parent e0de2c1 commit 0a266cb

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

monai/transforms/spatial/array.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,9 @@ def __init__(
667667
def randomize(self):
668668
self._do_transform = self.R.random_sample() < self.prob
669669
if hasattr(self.min_zoom, "__iter__"):
670-
self._zoom = (self.R.uniform(l, h) for l, h in zip(self.min_zoom, self.max_zoom))
670+
# TODO: Review the types here
671+
# T484 Incompatible types in assignment (expression has type "Generator[Any, None, None]", variable has type "None")
672+
self._zoom = (self.R.uniform(l, h) for l, h in zip(self.min_zoom, self.max_zoom)) # type: ignore
671673
else:
672674
self._zoom = self.R.uniform(self.min_zoom, self.max_zoom)
673675

monai/transforms/spatial/dictionary.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,9 @@ def __init__(
821821
def randomize(self):
822822
self._do_transform = self.R.random_sample() < self.prob
823823
if hasattr(self.min_zoom, "__iter__"):
824-
self._zoom = (self.R.uniform(l, h) for l, h in zip(self.min_zoom, self.max_zoom))
824+
# TODO: Review the types here
825+
# T484 Incompatible types in assignment (expression has type "Generator[Any, None, None]", variable has type "None")
826+
self._zoom = (self.R.uniform(l, h) for l, h in zip(self.min_zoom, self.max_zoom)) # type: ignore
825827
else:
826828
self._zoom = self.R.uniform(self.min_zoom, self.max_zoom)
827829

0 commit comments

Comments
 (0)