File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -2520,7 +2520,8 @@ def quote_type_string(type_string: str) -> str:
25202520    if  (
25212521        type_string  in  ["Module" , "overloaded function" , "<deleted>" ]
25222522        or  type_string .startswith ("Module " )
2523-         or  short_tuple_or_union (type_string )
2523+         or  type_string .startswith (("<tuple " , "<union " ))
2524+         and  type_string .endswith (" item>" )
25242525        or  type_string .endswith ("?" )
25252526    ):
25262527        # Messages are easier to read if these aren't quoted.  We use a 
@@ -2529,12 +2530,6 @@ def quote_type_string(type_string: str) -> str:
25292530    return  f'"{ type_string }  "' 
25302531
25312532
2532- def  short_tuple_or_union (typ : str ) ->  bool :
2533-     if  not  (typ .startswith ("<tuple " ) or  typ .startswith ("<union " )):
2534-         return  False 
2535-     return  typ .endswith (" item>" )
2536- 
2537- 
25382533def  format_callable_args (
25392534    arg_types : list [Type ],
25402535    arg_kinds : list [ArgKind ],
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments