Skip to content

Commit 5c94bd6

Browse files
committed
use key access and not values
1 parent 58082b9 commit 5c94bd6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/test_typing_extensions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1705,7 +1705,8 @@ def func(x: annot = None): pass
17051705
def func(x: annot): pass
17061706
type_hints = get_type_hints(func, include_extras=True)
17071707
self.assertEqual(type_hints, expected)
1708-
self.assertEqual(hash(type_hints.values()), hash(expected.values()))
1708+
for k in type_hints.keys():
1709+
self.assertEqual(hash(type_hints[k]), hash(expected[k]))
17091710
with self.subTest("Test str and repr"):
17101711
if sys.version_info[:2] == (3, 8) and annot == Union[str, None, "str"]:
17111712
# This also skips Union[str, "str"] wrap_optional=True which has the same problem

0 commit comments

Comments
 (0)