Fixes the options, if necessary. I.e., it adds all required elements to the dictionary.

        :param options: the options to fix
        :type options: dict
        :return: the (potentially) fixed options
        :rtype: dict
346407
def fix_config(self, options):
        
        options = super(Console, self).fix_config(options)

        opt = "prefix"
        if opt not in options:
            options[opt] = ""
        if opt not in self.help:
            self.help[opt] = "The prefix for the output (string)."

        return options
631784
def add_opt(self, opt, value=None):
        
        if value is None:
            self.common_options += [opt]
        else:
            self.common_options += [opt, value]
606786
def fix_config(self, options):
        
        options = super(DeleteStorageValue, self).fix_config(options)

        opt = "storage_name"
        if opt not in options:
            options[opt] = "unknown"
        if opt not in self.help:
            self.help[opt] = "The name of the storage value to delete (string)."

        return options
896869
def fix_config(self, options):
        
        options = super(Train, self).fix_config(options)

        opt = "setup"
        if opt not in options:
            options[opt] = Classifier(classname="weka.classifiers.rules.ZeroR")
        if opt not in self.help:
            self.help[opt] = "The classifier/clusterer/associator to train (Classifier/Clusterer/Associator)."

        return options
492927
def fix_config(self, options):
        
        options = super(PRC, self).fix_config(options)

        opt = "class_index"
        if opt not in options:
            options[opt] = [0]
        if opt not in self.help:
            self.help[opt] = "The list of 0-based class-label indices to display (list)."

        opt = "key_loc"
        if opt not in options:
            options[opt] = "lower center"
        if opt not in self.help:
            self.help[opt] = "The location of the key in the plot (str)."

        opt = "title"
        if opt not in options:
            options[opt] = None
        if opt not in self.help:
            self.help[opt] = "The title for the plot (str)."

        opt = "outfile"
        if opt not in options:
            options[opt] = None
        if opt not in self.help:
            self.help[opt] = "The file to store the plot in (str)."

        opt = "wait"
        if opt not in options:
            options[opt] = True
        if opt not in self.help:
            self.help[opt] = "Whether to wait for user to close the plot window (bool)."

        return options
594168
def _option(self):
        
        class Options(object):
            def __getitem__(_self, name):
                return self.getOption(name)

            def __setitem__(_self, name, value):
                self.setOption(name, value)

        return Options()
459322
def parse_options(self, options):
        
        for name in self.get_option_names():
            parse = getattr(self, "parse_option_{name:s}".format(
                name=name), None)
            if parse is not None and isinstance(parse, collections.Callable):
                options[name] = parse()
        return options
204482
def remove_option(self, option):
        
        if len(self.options) > 0:
            if self._sized_op:
                if not isinstance(option, str):
                    raise TypeError("``option`` should be a name string!")
                for i in range(len(self.options)):
                    if self.options[i][0] == option:
                        self.options.pop(i)
                        break
            else:
                if not isinstance(option, int):
                    raise TypeError("``option`` should be an integer index!")
                self.options.pop(option)
1189935
def setOptions( self, options ):
        
        self._options = map(str, options)
        
        if ( options ):
            completer = QCompleter(options, self)
            completer.setCompletionMode(QCompleter.InlineCompletion)
            self.setCompleter(completer)
        else:
            self.setCompleter(None)
231619
def fix_config(self, options):
        
        options = super(CombineStorage, self).fix_config(options)

        opt = "format"
        if opt not in options:
            options[opt] = ""
        if opt not in self.help:
            self.help[opt] = "The format to use for generating the combined string; use '@{blah}' for accessing "\
                             "storage item 'blah' (string)."

        return options
10854
def addopt ( opt )
      raise TypeError, 'Incorrectly types for option object.' unless
	opt.instance_of? Cmdlib::Option

      @options[opt.longname.to_sym] = opt
    end
556277
def _SetOptions(self, options, options_class_name):
    
    self._options = options
    self._options_class_name = options_class_name

    # Does this descriptor have non-default options?
    self.has_options = options is not None
670026
def add_option(self, section, option, value=None):
        
        # check if section exists; create if not
        if not self.config.has_section(section):
            message = self.add_section(section)
            if not message[0]:
                return message

        if not self.config.has_option(section, option):
            if value:
                self.config.set(section, option, value)
            else:
                self.config.set(section, option)
            return(True, self.config.options(section))
        return(False, 'Option: {} already exists @ {}'.format(option, section))
732156
def add_options(cls, parser):
        
        parser.add_option('--show-pydocstyle', action='store_true', help='show explanation of each PEP 257 error')
        parser.config_options.append('show-pydocstyle')
124210
def update(self, **kwargs):
        
        # Override the template values with the override values.
        for s in config.sections():
            for o in config.options(s):
                override = kwargs.pop(o, None)
                if override:
                    config.set(s, o, override)
791799
def fixed(self):
        
        decision = False
        for record in self.history:
            # Completely ignore older changes
            if record["when"] < self.options.since.date:
                continue
            # Look for status change to MODIFIED (unless already found)
            if not decision and record["when"] < self.options.until.date:
                for change in record["changes"]:
                    if (change["field_name"] == "status"
                            and change["added"] == "MODIFIED"
                            and change["removed"] != "CLOSED"):
                        decision = True
            # Make sure that the bug has not been later moved to ASSIGNED.
            # (This would mean the issue has not been fixed properly.)
            else:
                for change in record["changes"]:
                    if (change["field_name"] == "status"
                            and change["added"] == "ASSIGNED"):
                        decision = False
        return decision
1002569
def register_optionables(self, optionables):
    
    if not isinstance(optionables, Iterable):
      raise TypeError('The optionables must be an iterable, given {}'.format(optionables))
    optionables = tuple(optionables)
    if not optionables:
      return

    invalid_optionables = [s
                           for s in optionables
                           if not isinstance(s, type) or not issubclass(s, Optionable)]
    if invalid_optionables:
      raise TypeError('The following items from the given optionables are not Optionable '
                      'subclasses:\n\t{}'.format('\n\t'.join(str(i) for i in invalid_optionables)))

    self._optionables.update(optionables)