mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	bpo-26952: [argparse] clearer error when formatting an empty mutually… (GH-30099) (GH-30115)
(cherry picked from commit 86de99588d)
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
			
			
This commit is contained in:
		
							parent
							
								
									17260e44b5
								
							
						
					
					
						commit
						f0b274d2e2
					
				
					 3 changed files with 11 additions and 0 deletions
				
			
		|  | @ -392,6 +392,9 @@ def _format_actions_usage(self, actions, groups): | |||
|         group_actions = set() | ||||
|         inserts = {} | ||||
|         for group in groups: | ||||
|             if not group._group_actions: | ||||
|                 raise ValueError(f'empty group {group}') | ||||
| 
 | ||||
|             try: | ||||
|                 start = actions.index(group._group_actions[0]) | ||||
|             except ValueError: | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Miss Islington (bot)
						Miss Islington (bot)