mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 21:51:50 +00:00 
			
		
		
		
	bpo-36876: Minor cleanup to c-analyzer "ignored" data.' (gh-31239)
https://bugs.python.org/issue36876
This commit is contained in:
		
							parent
							
								
									78ae4cc6dc
								
							
						
					
					
						commit
						cb68788dca
					
				
					 3 changed files with 261 additions and 513 deletions
				
			
		
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							|  | @ -1460,6 +1460,7 @@ Objects/obmalloc.c	-	_PyMem_Debug	- | |||
| Objects/obmalloc.c	-	_PyMem_Raw	- | ||||
| Objects/obmalloc.c	-	_PyObject	- | ||||
| Objects/obmalloc.c	-	usedpools	- | ||||
| Objects/typeobject.c	-	name_op	- | ||||
| Objects/unicodeobject.c	-	stripfuncnames	- | ||||
| Objects/unicodeobject.c	-	utf7_category	- | ||||
| Objects/unicodeobject.c	unicode_decode_call_errorhandler_wchar	argparse	- | ||||
|  |  | |||
| Can't render this file because it has a wrong number of fields in line 4. | 
|  | @ -92,6 +92,7 @@ def collate_sections(lines): | |||
| # the commands | ||||
| 
 | ||||
| def cmd_count_by_section(lines): | ||||
|     div = ' ' + '-' * 50 | ||||
|     total = 0 | ||||
|     def render_tree(root, depth=0): | ||||
|         nonlocal total | ||||
|  | @ -100,11 +101,14 @@ def render_tree(root, depth=0): | |||
|             subroot, rows, totalrows = data | ||||
|             sectotal = f'({len(totalrows)})' if totalrows != rows else '' | ||||
|             count = len(rows) if rows else '' | ||||
|             if depth == 0: | ||||
|                 yield div | ||||
|             yield f'{sectotal:>7} {count:>4}  {indent}{name}' | ||||
|             yield from render_tree(subroot, depth+1) | ||||
|             total += len(rows) | ||||
|     sections = collate_sections(lines) | ||||
|     yield from render_tree(sections) | ||||
|     yield div | ||||
|     yield f'(total: {total})' | ||||
| 
 | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Eric Snow
						Eric Snow