MCPcopy
hub / github.com/brightio/penelope / show_modules

Method show_modules

penelope.py:1189–1203  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1187
1188 @staticmethod
1189 def show_modules():
1190 categories = defaultdict(list)
1191 for module in modules().values():
1192 categories[module.category].append(module)
1193
1194 print()
1195 for category in categories:
1196 print(" " + str(paint(category).BLUE))
1197 table = Table(joinchar=' │ ')
1198 for module in categories[category]:
1199 description = module.run.__doc__ or ""
1200 if description:
1201 description = module.run.__doc__.strip().splitlines()[0]
1202 table += [paint(module.__name__).red, description]
1203 print(indent(str(table), ' '), "\n", sep="")
1204
1205 @session_operation(current=True)
1206 def do_run(self, line):

Callers 3

show_helpMethod · 0.95
do_runMethod · 0.95
do_modulesMethod · 0.95

Calls 3

modulesFunction · 0.85
paintClass · 0.85
TableClass · 0.85

Tested by

no test coverage detected