loam/cli.py
def _cmd_opts_solver(self, cmd_name):
        """Scan options related to one command and enrich _opt_cmds."""
        sections = self.sections_list(cmd_name)
        cmd_dict = self._opt_cmds[cmd_name] if cmd_name else self._opt_bare
        for sct in reversed(sections):
            for opt, opt_meta in self._conf[sct].def_.items():
                if not opt_meta.cmd_arg:
                    continue
                if opt not in cmd_dict:
                    cmd_dict[opt] = sct
                else:
                    warnings.warn(
                        'Command <{0}>: {1}.{2} shadowed by {3}.{2}'.format(
                            cmd_name, sct, opt, cmd_dict[opt]),
                        error.LoamWarning, stacklevel=4)
def _cmd_opts_solver(self, cmd_name):
        """Scan options related to one command and enrich _opt_cmds."""
        sections = self.sections_list(cmd_name)
        cmd_dict = self._opt_cmds[cmd_name] if cmd_name else self._opt_bare
        for sct in reversed(sections):
            for opt, opt_meta in self._conf[sct].def_.items():
                if not opt_meta.cmd_arg:
                    continue
                if opt not in cmd_dict:
                    cmd_dict[opt] = sct
                else:
                    warnings.warn(
                        'Command <{0}>: {1}.{2} shadowed by {3}.{2}'.format(
                            cmd_name, sct, opt, cmd_dict[opt]),
                        error.LoamWarning, stacklevel=4)
Scan options related to one command and enrich _opt_cmds.