8000 bpo-36876: [c-analyzer tool] Additional CLI updates for "capi" command. by ericsnowcurrently · Pull Request #23929 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-36876: [c-analyzer tool] Additional CLI updates for "capi" command. #23929

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Dec 25, 2020
Prev Previous commit
Next Next commit
format: brief -> table
  • Loading branch information
ericsnowcurrently committed Dec 25, 2020
commit 112dcae419c21c7267d444453ab898393f9329f5
4 changes: 2 additions & 2 deletions Tools/c-analyzer/cpython/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ def process_kinds(args, *, argv=None):
parser.add_argument('--group-by', dest='groupby',
choices=['level', 'kind'])

parser.add_argument('--format', default='brief')
parser.add_argument('--format', default='table')
parser.add_argument('--summary', dest='format',
action='store_const', const='summary')
def process_format(args, *, argv=None):
Expand Down Expand Up @@ -278,7 +278,7 @@ def cmd_capi(filenames=None, *,
levels=None,
kinds=None,
groupby='kind',
format='brief',
format='table',
track_progress=None,
verbosity=VERBOSITY,
**kwargs
Expand Down
4 changes: 2 additions & 2 deletions Tools/c-analyzer/cpython/_capi.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ def sortkey(item):

def resolve_format(format):
if not format:
return 'brief'
return 'table'
elif isinstance(format, str) and format in _FORMATS:
return format
else:
Expand Down Expand Up @@ -520,7 +520,7 @@ def render_summary(items, *, groupby='kind', sort=None, verbose=False):


_FORMATS = {
'brief': render_table,
'table': render_table,
'full': render_full,
'summary': render_summary,
}
0