mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
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:
parent
e091520fdb
commit
dc6d66f44c
20 changed files with 562 additions and 327 deletions
|
@ -2314,7 +2314,7 @@ class TestDocString(unittest.TestCase):
|
|||
class C:
|
||||
x: Union[int, type(None)] = None
|
||||
|
||||
self.assertDocStrEqual(C.__doc__, "C(x:Optional[int]=None)")
|
||||
self.assertDocStrEqual(C.__doc__, "C(x:int|None=None)")
|
||||
|
||||
def test_docstring_list_field(self):
|
||||
@dataclass
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue