MCPcopy
hub / github.com/google/python-fire / _UsageDetailsSections

Function _UsageDetailsSections

fire/helptext.py:287–301  ·  view source on GitHub ↗

The usage details sections of the help string.

(component, actions_grouped_by_kind)

Source from the content-addressed store, hash-verified

285
286
287def _UsageDetailsSections(component, actions_grouped_by_kind):
288 """The usage details sections of the help string."""
289 groups, commands, values, indexes = actions_grouped_by_kind
290
291 sections = []
292 if groups.members:
293 sections.append(_MakeUsageDetailsSection(groups))
294 if commands.members:
295 sections.append(_MakeUsageDetailsSection(commands))
296 if values.members:
297 sections.append(_ValuesUsageDetailsSection(component, values))
298 if indexes.members:
299 sections.append(('INDEXES', _NewChoicesSection('INDEX', indexes.names)))
300
301 return sections
302
303
304def _GetSummary(info):

Callers 1

HelpTextFunction · 0.85

Calls 3

_MakeUsageDetailsSectionFunction · 0.85
_NewChoicesSectionFunction · 0.85

Tested by

no test coverage detected