Skip to content

Commit 4dbceea

Browse files
generatedunixname499836121facebook-github-bot
authored andcommitted
Fix dict.items() return type (#150112)
Summary: Fixes #150110 X-link: pytorch/pytorch#150112 Approved by: https://github.com/jansel, https://github.com/zou3519 Reviewed By: atalman Differential Revision: D72453889 fbshipit-source-id: 82fcad0c9a8da075678eeb667f458df64fda87a6
1 parent df6622b commit 4dbceea

File tree

1 file changed

+9
-1
lines changed
  • userbenchmark/dynamo/dynamobench/_dynamo

1 file changed

+9
-1
lines changed

userbenchmark/dynamo/dynamobench/_dynamo/utils.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,14 @@
9494

9595

9696
if typing.TYPE_CHECKING:
97-
from collections.abc import Generator, Iterable, Iterator, KeysView, ValuesView
97+
from collections.abc import (
98+
Generator,
99+
ItemsView,
100+
Iterable,
101+
Iterator,
102+
KeysView,
103+
ValuesView,
104+
)
98105

99106

100107
try:
@@ -2416,6 +2423,7 @@ def check_numpy_ndarray_args(args, kwargs):
24162423

24172424
dict_keys: type[KeysView[Any]] = type({}.keys())
24182425
dict_values: type[ValuesView[Any]] = type({}.values())
2426+
dict_items: type[ItemsView[Any, Any]] = type({}.items())
24192427
odict_values: type[ValuesView[Any]] = type(OrderedDict().values())
24202428
tuple_iterator: type[Iterator[Any]] = type(iter(()))
24212429
range_iterator: type[Iterator[Any]] = type(iter(range(0)))

0 commit comments

Comments
 (0)