8000 gh-114053: Fix bad interaction of PEP 695, PEP 563 and `inspect.get_annotations` by AlexWaygood · Pull Request #120270 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-114053: Fix bad interaction of PEP 695, PEP 563 and inspect.get_annotations #120270

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 6 commits into from
Jun 13, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update test_inspect.py
  • Loading branch information
AlexWaygood authored Jun 8, 2024
commit d3a3233b0915e36f871dfdb151232f9120cab9bb
2 changes: 1 addition & 1 deletion Lib/test/test_inspect/test_inspect.py
68C1
Original file line number Diff line number Diff line change
Expand Up @@ -1704,7 +1704,7 @@ def test_get_annotations_with_stringized_pep695_annotations(self):
self.assertIs(A_annotations["z"].__args__[0], A_type_params[2])

B_annotations = inspect.get_annotations(ann_module695.B, eval_str=True)
self.assertEqual(B_annotations, {"x": int, "y": str, "P": bytes})
self.assertEqual(B_annotations, {"x": int, "y": str, "z": bytes})

generic_function_annotations = inspect.get_annotations(
ann_module695.generic_function, eval_str=True
Expand Down
Loading
0