Browse Source
bpo-44490: Improve typing module compatibility with types.Union (GH-27048) (#27222)
bpo-44490: Improve typing module compatibility with types.Union (GH-27048) (#27222)
(cherry picked from commit bf89ff96e6)
Co-authored-by: Yurii Karabas <1998uriyyo@gmail.com>
pull/27242/head
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 40 additions and 7 deletions
-
2Lib/test/ann_module.py
-
2Lib/test/test_grammar.py
-
22Lib/test/test_typing.py
-
18Lib/typing.py
-
3Misc/NEWS.d/next/Core and Builtins/2021-07-06-22-22-15.bpo-44490.BJxPbZ.rst
@ -0,0 +1,3 @@ |
|||
:mod:`typing` now searches for type parameters in ``types.Union`` objects. |
|||
``get_type_hints`` will also properly resolve annotations with nested |
|||
``types.Union`` objects. Patch provided by Yurii Karabas. |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue