Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def get_topics(self, this_thing):
topics = dict()
for cmd in chain(thing, this_thing.iter_commands()):
if cmd.visible:
topic = cmd.format.replace("{thing}", thing.name)
help = cmd.help.replace("{thing}", thing.name)
topics[topic] = help
return topics
def get_topics(self, this_thing):
topics = dict()
for cmd in chain(thing, this_thing.iter_commands()):
if cmd.visible:
topic = cmd.format.replace("{thing}", thing.name)
help = cmd.help.replace("{thing}", thing.name)
topics[topic] = help
return topics