gh-105499: Merge typing.Union and types.UnionType (#105511)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Ken Jin <kenjin@python.org>
Co-authored-by: Carl Meyer <carl@oddbird.net>
This commit is contained in:
Jelle Zijlstra 2025-03-04 11:44:19 -08:00 committed by GitHub
parent e091520fdb
commit dc6d66f44c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 562 additions and 327 deletions

View file

@ -3083,7 +3083,7 @@ class TestSingleDispatch(unittest.TestCase):
"Invalid annotation for 'arg'."
)
self.assertEndsWith(str(exc.exception),
'typing.Union[int, typing.Iterable[str]] not all arguments are classes.'
'int | typing.Iterable[str] not all arguments are classes.'
)
def test_invalid_positional_argument(self):