Skip to content

Commit 386555c

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 755a1ab commit 386555c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/torchio/datasets/ct_rate.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,11 @@ def __init__(
8484
root: TypePath,
8585
split: TypeSplit = 'train',
8686
*,
87-
token: Optional[str] = None,
87+
token: str | None = None,
8888
download: bool = False,
89-
num_subjects: Optional[int] = None,
89+
num_subjects: int | None = None,
9090
report_key: str = 'report',
91-
sizes: Optional[list[int]] = None,
91+
sizes: list[int] | None = None,
9292
**kwargs,
9393
):
9494
self._root_dir = Path(root)
@@ -347,7 +347,7 @@ def _get_subject(
347347
DataFrame containing metadata for all images associated to that subject.
348348
"""
349349
subject_id, subject_df = subject_id_and_metadata
350-
subject_dict: dict[str, Union[str, ScalarImage]] = {'subject_id': subject_id}
350+
subject_dict: dict[str, str | ScalarImage] = {'subject_id': subject_id}
351351
for _, image_row in subject_df.iterrows():
352352
image = self._instantiate_image(image_row)
353353
scan_id = image_row['scan_id']

0 commit comments

Comments
 (0)