INNER CODE UNIT · Python
report
torognes/vsearch · completion/scripts/check_option_drift.py:73
def report(label: str, items) -> None:
items = sorted(items)
print(f'{label}: {len(items)}')
for item in items:
print(f' {item}')
if items:
problems.append(label)
print('counts')
print(f' cli.cc: {len(cli_options)} options, {len(cli_commands)} commands, '
f'{sum(len(v) for v in cli_commands.values())} command/option pairs')
print(f' spec: {len(spec_options)} options, {len(spec_commands)} commands, '
f'{sum(len(v) for v in spec_accepts.values())} command/option pairs')
print()
print('options')
report(' in cli.cc but missing from the spec',
set(cli_options) - set(spec_options))