@@ -462,7 +462,7 @@ def _remove_all(self, k):
462
462
cell [PREV ][NEXT ], cell [NEXT ][PREV ] = cell [NEXT ], cell [PREV ]
463
463
del self ._map [k ]
464
464
465
- def iteritems (self , multi : bool = False ) -> Generator [tuple [_KT , _VT ]]:
465
+ def iteritems (self , multi : bool = False ) -> Generator [tuple [_KT , _VT ], None , None ]:
466
466
"""Iterate over the OMD's items in insertion order. By default,
467
467
yields only the most-recently inserted value for each key. Set
468
468
*multi* to ``True`` to get all inserted items.
@@ -477,7 +477,7 @@ def iteritems(self, multi: bool = False) -> Generator[tuple[_KT, _VT]]:
477
477
for key in self .iterkeys ():
478
478
yield key , self [key ]
479
479
480
- def iterkeys (self , multi : bool = False ) -> Generator [_KT ]:
480
+ def iterkeys (self , multi : bool = False ) -> Generator [_KT , None , None ]:
481
481
"""Iterate over the OMD's keys in insertion order. By default, yields
482
482
each key once, according to the most recent insertion. Set
483
483
*multi* to ``True`` to get all keys, including duplicates, in
@@ -499,7 +499,7 @@ def iterkeys(self, multi: bool = False) -> Generator[_KT]:
499
499
yield k
500
500
curr = curr [NEXT ]
501
501
502
- def itervalues (self , multi : bool = False ) -> Generator [_VT ]:
502
+ def itervalues (self , multi : bool = False ) -> Generator [_VT , None , None ]:
503
503
"""Iterate over the OMD's values in insertion order. By default,
504
504
yields the most-recently inserted value per unique key. Set
505
505
*multi* to ``True`` to get all values according to insertion
@@ -742,15 +742,15 @@ def _remove_all(self, k):
742
742
cell [PREV ][NEXT ], cell [NEXT ][PREV ] = cell [NEXT ], cell [PREV ]
743
743
cell [PREV ][SNEXT ] = cell [SNEXT ]
744
744
745
- def iteritems (self , multi : bool = False ) -> Generator [tuple [_KT , _VT ]]:
745
+ def iteritems (self , multi : bool = False ) -> Generator [tuple [_KT , _VT ], None , None ]:
746
746
next_link = NEXT if multi else SNEXT
747
747
root = self .root
748
748
curr = root [next_link ]
749
749
while curr is not root :
750
750
yield curr [KEY ], curr [VALUE ]
751
751
curr = curr [next_link ]
752
752
753
- def iterkeys (self , multi : bool = False ) -> Generator [_KT ]:
753
+ def iterkeys (self , multi : bool = False ) -> Generator [_KT , None , None ]:
754
754
next_link = NEXT if multi else SNEXT
755
755
root = self .root
756
756
curr = root [next_link ]
@@ -1017,7 +1017,7 @@ def replace(self, key: _KT, newkey: _KT) -> None:
1017
1017
revset .remove (key )
1018
1018
revset .add (newkey )
1019
1019
1020
- def iteritems (self ) -> Generator [tuple [_KT , _VT ]]:
1020
+ def iteritems (self ) -> Generator [tuple [_KT , _VT ], None , None ]:
1021
1021
for key in self .data :
1022
1022
for val in self .data [key ]:
1023
1023
yield key , val
0 commit comments