mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +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 @@ def test_docstring_one_field_with_default_none(self): | |||
|         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
	
	 Vlad Serebrennikov
						Vlad Serebrennikov