Skip to content

Commit 181f2f6

Browse files
committed
Fix mypy issues
1 parent eee76b3 commit 181f2f6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

torchdata/datapipes/iter/util/converter.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
# LICENSE file in the root directory of this source tree.
66

77
import warnings
8-
9-
from typing import Callable, Dict, Optional
8+
from typing import Callable, Dict, Iterator, Optional
109

1110
from torch.utils.data import IterDataPipe, MapDataPipe
1211
from torch.utils.data.datapipes.utils.common import _check_unpickable_fn, DILL_AVAILABLE
@@ -59,6 +58,8 @@ class IterToMapConverterMapDataPipe(MapDataPipe):
5958
key_value_fn: Optional[Callable]
6059
_map: Optional[Dict]
6160
_length: int
61+
_itr: Optional[Iterator]
62+
_depleted: bool
6263

6364
def __init__(self, datapipe: IterDataPipe, key_value_fn: Optional[Callable] = None):
6465
if not isinstance(datapipe, IterDataPipe):

0 commit comments

Comments
 (0)