8000 gh-114053: Fix another edge case involving `get_type_hints`, PEP 695 and PEP 563 by AlexWaygood · Pull Request #120272 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-114053: Fix another edge case involving get_type_hints, PEP 695 and PEP 563 #120272

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jun 25, 2024
Prev Previous commit
Next Next commit
remove redundant assertions in test
  • Loading branch information
AlexWaygood authored Jun 9, 2024
commit ffdba91b2879a4100e4e98dd8ed92276c0ccc97d
4 changes: 0 additions & 4 deletions Lib/test/test_typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -4869,8 +4869,6 @@ def test_pep695_generic_with_future_annotations(self):
self.assertEqual(hints_for_B, {"x": int, "y": str, "z": bytes})

hints_for_C = get_type_hints(ann_module695.C)
self.assertNotIn(int, hints_for_C.values())
self.assertNotIn(str, hints_for_C.values())
self.assertEqual(
set(hints_for_C.values()),
set(ann_module695.C.__type_params__)
Expand All @@ -4887,8 +4885,6 @@ def test_pep695_generic_with_future_annotations(self):
self.assertIs(hints_for_generic_function["zz"].__origin__, func_t_params[2])

hints_for_generic_method = get_type_hints(ann_module695.D.generic_method)
self.assertNotIn(int, hints_for_generic_method.values())
self.assertNotIn(str, hints_for_generic_method.values())
params = {
param.__name__: param
for param in ann_module695.D.generic_method.__type_params__
Expand Down
Loading
0