Skip to content

Commit b8ac64e

Browse files
committed
add type annotation to meta variable
1 parent 47b16cc commit b8ac64e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

monai/apps/reconstruction/transforms/dictionary.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
from __future__ import annotations
1313

1414
from collections.abc import Hashable, Mapping, Sequence
15+
from typing import Any
1516

1617
import numpy as np
1718
from numpy import ndarray
@@ -61,9 +62,10 @@ def __call__(self, data: Mapping[Hashable, NdarrayOrTensor]) -> dict[Hashable, T
6162

6263
d = dict(data)
6364

65+
meta: dict[str, Any]
6466
if isinstance(d[self.meta_key], MetaTensor):
6567
# meta tensor
66-
meta = d[self.meta_key].meta
68+
meta = d[self.meta_key].meta # type: ignore
6769
else:
6870
# meta dict
6971
meta = d[self.meta_key]

0 commit comments

Comments
 (0)