

def run(self):
    env = self.state.document.settings.env
    statename = self.arguments[0].strip()
    if ('noindex' in self.options):
        return []
    targetnode = nodes.target('', '', ids=[('module-' + statename)], ismod=True)
    self.state.document.note_explicit_target(targetnode)
    formula = env.temp_data.get('salt:formula')
    indextext = '{1} ({0}-formula)'.format(formula, statename)
    inode = addnodes.index(entries=[('single', indextext, 'module-{0}'.format(statename), '')])
    return [targetnode, inode]

dataset/ETHPy150Open saltstack/salt/doc/_ext/saltdomain.py State.run/original