mirror of
https://github.com/python/cpython.git
synced 2025-07-30 06:34:15 +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 - _PyMem_Raw -
|
||||||
Objects/obmalloc.c - _PyObject -
|
Objects/obmalloc.c - _PyObject -
|
||||||
Objects/obmalloc.c - usedpools -
|
Objects/obmalloc.c - usedpools -
|
||||||
|
Objects/typeobject.c - name_op -
|
||||||
Objects/unicodeobject.c - stripfuncnames -
|
Objects/unicodeobject.c - stripfuncnames -
|
||||||
Objects/unicodeobject.c - utf7_category -
|
Objects/unicodeobject.c - utf7_category -
|
||||||
Objects/unicodeobject.c unicode_decode_call_errorhandler_wchar argparse -
|
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
|
# the commands
|
||||||
|
|
||||||
def cmd_count_by_section(lines):
|
def cmd_count_by_section(lines):
|
||||||
|
div = ' ' + '-' * 50
|
||||||
total = 0
|
total = 0
|
||||||
def render_tree(root, depth=0):
|
def render_tree(root, depth=0):
|
||||||
nonlocal total
|
nonlocal total
|
||||||
|
@ -100,11 +101,14 @@ def cmd_count_by_section(lines):
|
||||||
subroot, rows, totalrows = data
|
subroot, rows, totalrows = data
|
||||||
sectotal = f'({len(totalrows)})' if totalrows != rows else ''
|
sectotal = f'({len(totalrows)})' if totalrows != rows else ''
|
||||||
count = len(rows) if rows else ''
|
count = len(rows) if rows else ''
|
||||||
|
if depth == 0:
|
||||||
|
yield div
|
||||||
yield f'{sectotal:>7} {count:>4} {indent}{name}'
|
yield f'{sectotal:>7} {count:>4} {indent}{name}'
|
||||||
yield from render_tree(subroot, depth+1)
|
yield from render_tree(subroot, depth+1)
|
||||||
total += len(rows)
|
total += len(rows)
|
||||||
sections = collate_sections(lines)
|
sections = collate_sections(lines)
|
||||||
yield from render_tree(sections)
|
yield from render_tree(sections)
|
||||||
|
yield div
|
||||||
yield f'(total: {total})'
|
yield f'(total: {total})'
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue