From 556700001fcdb2a5861e0e99d619dc8831c216fb Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 31 Jul 2023 12:00:39 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- monai/transforms/spatial/array.py | 4 ++-- monai/transforms/spatial/dictionary.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/monai/transforms/spatial/array.py b/monai/transforms/spatial/array.py index 2f8e6cefe7..44d5c6ffa3 100644 --- a/monai/transforms/spatial/array.py +++ b/monai/transforms/spatial/array.py @@ -3476,7 +3476,7 @@ def __init__( upsample_mode: InterpolateMode | str = InterpolateMode.TRILINEAR, zoom_range: Sequence[float] = (0.5, 1.0), align_corners=False, - device: Optional[torch.device] = None, + device: torch.device | None = None, ) -> None: """ Args: @@ -3500,7 +3500,7 @@ def __init__( self.device = device self.zoom_factor = 1 - def randomize(self, data: Optional[Any] = None) -> None: + def randomize(self, data: Any | None = None) -> None: super().randomize(None) self.zoom_factor = self.R.uniform(self.zoom_range[0], self.zoom_range[1]) if not self._do_transform: diff --git a/monai/transforms/spatial/dictionary.py b/monai/transforms/spatial/dictionary.py index 47270e38f0..436fb280c3 100644 --- a/monai/transforms/spatial/dictionary.py +++ b/monai/transforms/spatial/dictionary.py @@ -2582,7 +2582,7 @@ def __init__( def set_random_state( self, seed: int | None = None, state: np.random.RandomState | None = None - ) -> "RandSimulateLowResolutiond": + ) -> RandSimulateLowResolutiond: super().set_random_state(seed, state) return self