mirror of
https://github.com/python/cpython.git
synced 2025-10-17 20:28:43 +00:00
bpo-44490: Improve typing module compatibility with types.Union (GH-27048)
This commit is contained in:
parent
f783428a23
commit
bf89ff96e6
5 changed files with 40 additions and 7 deletions
|
@ -473,7 +473,7 @@ class GrammarTests(unittest.TestCase):
|
|||
def test_var_annot_module_semantics(self):
|
||||
self.assertEqual(test.__annotations__, {})
|
||||
self.assertEqual(ann_module.__annotations__,
|
||||
{1: 2, 'x': int, 'y': str, 'f': typing.Tuple[int, int]})
|
||||
{1: 2, 'x': int, 'y': str, 'f': typing.Tuple[int, int], 'u': int | float})
|
||||
self.assertEqual(ann_module.M.__annotations__,
|
||||
{'123': 123, 'o': type})
|
||||
self.assertEqual(ann_module2.__annotations__, {})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue