mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-40389: Improve repr of typing.Optional (#19714)
This commit is contained in:
parent
b1e11c31c5
commit
138a9b9c2a
4 changed files with 10 additions and 2 deletions
|
@ -2028,7 +2028,7 @@ class TestDocString(unittest.TestCase):
|
|||
class C:
|
||||
x: Union[int, type(None)] = None
|
||||
|
||||
self.assertDocStrEqual(C.__doc__, "C(x:Union[int, NoneType]=None)")
|
||||
self.assertDocStrEqual(C.__doc__, "C(x:Optional[int]=None)")
|
||||
|
||||
def test_docstring_list_field(self):
|
||||
@dataclass
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue