Skip to content

Commit 48bfd7d

Browse files
committed
Type alias fix
Signed-off-by: Eric Kerfoot <17726042+ericspod@users.noreply.github.com>
1 parent 4166c4e commit 48bfd7d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

monai/transforms/croppad/dictionary.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
from collections.abc import Callable, Hashable, Mapping, Sequence
2121
from copy import deepcopy
22-
from typing import Any, Optional, cast
22+
from typing import Any, TypeAlias, cast
2323

2424
import numpy as np
2525
import torch
@@ -486,7 +486,7 @@ def __init__(
486486
self._has_str_roi = any(isinstance(v, str) for v in [roi_center, roi_size, roi_start, roi_end])
487487

488488
if not self._has_str_roi:
489-
_roi_t = Optional[Sequence[int] | int]
489+
_roi_t: TypeAlias = Sequence[int] | int | None
490490
cropper = SpatialCrop(
491491
cast(_roi_t, roi_center),
492492
cast(_roi_t, roi_size),

0 commit comments

Comments
 (0)