MCPcopy Create free account
hub / github.com/python-cmd2/cmd2 / _get_macro_choices

Method _get_macro_choices

cmd2/cmd2.py:2715–2722  ·  view source on GitHub ↗

Return list of macro names and values as Choices.

(self)

Source from the content-addressed store, hash-verified

2713 return Choices(items=items)
2714
2715 def _get_macro_choices(self) -> Choices:
2716 """Return list of macro names and values as Choices."""
2717 items: list[CompletionItem] = []
2718
2719 for name, macro in self.macros.items():
2720 items.append(CompletionItem(name, display_meta=macro.value, table_data=[macro.value]))
2721
2722 return Choices(items=items)
2723
2724 def _get_settable_choices(self) -> Choices:
2725 """Return list of Settable names, values, and descriptions as Choices."""

Callers 1

test_get_macro_choicesFunction · 0.80

Calls 3

CompletionItemClass · 0.85
ChoicesClass · 0.85
appendMethod · 0.80

Tested by 1

test_get_macro_choicesFunction · 0.64