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
963969
def fix_config(self, options):
        
        options = super(UpdateStorageValue, 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 update (string)."

        opt = "expression"
        if opt not in options:
            options[opt] = "int({X} + 1)"
        if opt not in self.help:
            self.help[opt] = "The expression for updating the storage value; use {X} for current value (string)."

        return options
786002
def add_option(name, parameters)
      self.class.handle_warnings(name, **parameters.dup)
      chain_options.merge(name => parameters.merge(method_hash(parameters)))
    end
673418
def fix_config(self, options):
        
        options = super(ClassifierErrors, self).fix_config(options)

        opt = "absolute"
        if opt not in options:
            options[opt] = True
        if opt not in self.help:
            self.help[opt] = "Whether to use absolute errors as size or relative ones (bool)."

        opt = "max_relative_size"
        if opt not in options:
            options[opt] = 50
        if opt not in self.help:
            self.help[opt] = "The maximum size in point in case of relative mode (int)."

        opt = "absolute_size"
        if opt not in options:
            options[opt] = 50
        if opt not in self.help:
            self.help[opt] = "The size in point in case of absolute mode (int)."

        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
534824
def _fix_set_options(cls, options):
        """"""
        optional_set_options = ('ignore', 'select')
        mandatory_set_options = ('add_ignore', 'add_select')

        def _get_set(value_str):
            """Split `value_str` by the delimiter `,` and return a set.

            Removes any occurrences of '' in the set.
            Also expand error code prefixes, to avoid doing this for every
            file.

            """
            return cls._expand_error_codes(set(value_str.split(',')) - {''})

        for opt in optional_set_options:
            value = getattr(options, opt)
            if value is not None:
                setattr(options, opt, _get_set(value))

        for opt in mandatory_set_options:
            value = getattr(options, opt)
            if value is None:
                value = ''

            if not isinstance(value, Set):
                value = _get_set(value)

            setattr(options, opt, value)

        return options
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')
968388
def options(self):
        
        if self._options is None:
            self._options = Option.View(self)
        return self._options
263834
def fix_config(self, options):
        
        options = super(CrossValidate, 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 to train (Classifier/Clusterer)."

        opt = "folds"
        if opt not in options:
            options[opt] = 10
        if opt not in self.help:
            self.help[opt] = "The number of folds for CV (int)."

        opt = "seed"
        if opt not in options:
            options[opt] = 1
        if opt not in self.help:
            self.help[opt] = "The seed value for randomizing the data (int)."

        opt = "discard_predictions"
        if opt not in options:
            options[opt] = False
        if opt not in self.help:
            self.help[opt] = "Discard classifier predictions to save memory (bool)."

        opt = "output"
        if opt not in options:
            options[opt] = None
        if opt not in self.help:
            self.help[opt] = "For capturing the classifier's prediction output (PredictionOutput)."

        return options
822667
def fix_config(self, options):
        
        options = super(Trigger, self).fix_config(options)

        opt = "condition"
        if opt not in options:
            options[opt] = "True"
        if opt not in self.help:
            self.help[opt] = "The (optional) condition for teeing off the tokens; uses the 'eval' method, "\
                             "ie the expression must evaluate to a boolean value; storage values placeholders "\
                             "'@{...}' get replaced with their string representations before evaluating the "\
                             "expression (string)."

        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()
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
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)
61059
def add_parser_options(options: Dict[str, Dict[str, Any]], parser_id: str, parser_options: Dict[str, Dict[str, Any]],
                       overwrite: bool = False):
    
    if parser_id in options.keys() and not overwrite:
        raise ValueError('There are already options in this dictionary for parser id ' + parser_id)
    options[parser_id] = parser_options
    return options
1271141
def add_config_option(self, default=None):
        

        self.argparser.add_argument('--config', default=default, help='Config file to read. Defaults to: %(default)s')
        self.should_parse_config = True
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
445830
private Map<String,String> fixOptions( Map<String,String> options ) {

		if( options == null )
			options = new HashMap<> ();

		if( ! options.containsKey( DocConstants.OPTION_IMG_BACKGROUND_COLOR ))
			options.put( DocConstants.OPTION_IMG_BACKGROUND_COLOR, DocConstants.DEFAULT_BACKGROUND_COLOR );

		if( ! options.containsKey( DocConstants.OPTION_IMG_FOREGROUND_COLOR ))
			options.put( DocConstants.OPTION_IMG_FOREGROUND_COLOR, DocConstants.DEFAULT_FOREGROUND_COLOR );

		if( ! options.containsKey( DocConstants.OPTION_IMG_HIGHLIGHT_BG_COLOR ))
			options.put( DocConstants.OPTION_IMG_HIGHLIGHT_BG_COLOR, DocConstants.DEFAULT_HIGHLIGHT_BG_COLOR );

		return options;
	}
537748
def fix_config(self, options):
        
        opt = "setup"
        if opt not in options:
            options[opt] = datagen.DataGenerator(classname="weka.datagenerators.classifiers.classification.Agrawal")
        if opt not in self.help:
            self.help[opt] = "The data generator to use (DataGenerator)."

        opt = "incremental"
        if opt not in options:
            options[opt] = False
        if opt not in self.help:
            self.help[opt] = "Whether to output the data incrementally, in case the generator supports that (bool)."

        return super(DataGenerator, self).fix_config(options)
743930
def fix_config(self, options):
        
        options = super(CommandlineToAny, self).fix_config(options)

        opt = "wrapper"
        if opt not in options:
            options[opt] = "weka.core.classes.OptionHandler"
        if opt not in self.help:
            self.help[opt] = "The name of the wrapper class to use (string)."

        return options