Skip to content

Commit 7a5044d

Browse files
committed
fix: fix types
1 parent 2112823 commit 7a5044d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cellseg_models_pytorch/transforms/functional/generic_transforms.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# augmentations from the StrongAugment paper: https://github.com/jopo666/StrongAugment
22

33
import functools
4-
from typing import Optional, Union
4+
from typing import Dict, Optional, Tuple, Union
55

66
import cv2
77
import numpy as np
@@ -236,7 +236,7 @@ def _apply_operation(image: np.ndarray, operation_name: str, **kwargs) -> np.nda
236236
return operation_fn(image, **kwargs)
237237

238238

239-
def _check_augment_space(space: dict[str, tuple[MAGNITUDE, MAGNITUDE]]) -> None:
239+
def _check_augment_space(space: Dict[str, Tuple[MAGNITUDE, MAGNITUDE]]) -> None:
240240
"""Check that passed augmentation space is valid."""
241241
if not isinstance(space, dict):
242242
raise TypeError(f"Augment space should be a dict, not {type(space)}")
@@ -287,7 +287,7 @@ def _check_operation_bounds(name: str, low: MAGNITUDE, high: MAGNITUDE) -> None:
287287

288288

289289
def _magnitude_kwargs(
290-
operation_name: str, bounds: tuple[MAGNITUDE, MAGNITUDE], rng: RandomState
290+
operation_name: str, bounds: Tuple[MAGNITUDE, MAGNITUDE], rng: RandomState
291291
) -> Optional[dict[str, MAGNITUDE]]:
292292
"""Generate magnitude kwargs for apply_operations."""
293293
if operation_name == "tone":

0 commit comments

Comments
 (0)