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
490163
def fix_config(self, options):
        
        options = super(ROC, 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 right"
        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
533098
def fix_config(self, options):
        
        options = super(Predict, self).fix_config(options)

        opt = "model"
        if opt not in options:
            options[opt] = "."
        if opt not in self.help:
            self.help[opt] = "The serialized model to use for making predictions (string)."

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

        return options
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
659336
def resolve(self):
        
        if self.source and self.target:
            for key in self.source.keys():
                if (key not in self.dont_carry_over_options
                        and not self.target.has(key)):
                    self.target.set(key, self.source.get(key))
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
385524
def addOption(self, o):
    
    if self.hasOption(o.short):
      raise InterfaceException("Failed adding option - already have " + str(o))
    self.options.append(o)
252649
def fix_config(self, options):
        
        options = super(GetStorageValue, 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 retrieve (string)."

        return options
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;
	}
784140
def fix_config(self, options):
        
        options = super(RenameRelation, self).fix_config(options)

        opt = "name"
        if opt not in options:
            options[opt] = "newname"
        if opt not in self.help:
            self.help[opt] = "The new relation name to use (string)."

        return options
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
882896
def reload(self):
        
        self._conf = configparser.ConfigParser()
        # Preserve the case of sections and keys.
        self._conf.optionxform = str
        self._conf.read(self.config_file_path)
        if 'general' not in self._conf.keys():
            raise IncompleteConfigurationFile('Missing the general section')
        general = self._replace_data_types(dict(self._conf.items('general')))
        self._conf.remove_section('general')
        plugin = []
        for section in self._conf.sections():
            plugin.append(dict(self._conf.items(section)))
            plugin[-1].update({'name': section})
            plugin[-1] = self._replace_data_types(plugin[-1])
        return (plugin, general)
774620
def add_option(self, **options):
        
        for option, value in options.items():
            setattr(self, option, value)
            self._store_option(option)
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')
761727
def fix_config(self, options):
        
        options = super(ForLoop, self).fix_config(options)

        opt = "min"
        if opt not in options:
            options[opt] = 1
        if opt not in self.help:
            self.help[opt] = "The minimum for the loop (included, int)."

        opt = "max"
        if opt not in options:
            options[opt] = 10
        if opt not in self.help:
            self.help[opt] = "The maximum for the loop (included, int)."

        opt = "step"
        if opt not in options:
            options[opt] = 1
        if opt not in self.help:
            self.help[opt] = "The step size (int)."

        return options
1232166
def fix_config(self, options):
        
        options = super(FileSupplier, self).fix_config(options)

        opt = "files"
        if opt not in options:
            options[opt] = []
        if opt not in self.help:
            self.help[opt] = "The files to output (list of 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]
968388
def options(self):
        
        if self._options is None:
            self._options = Option.View(self)
        return self._options