Get list of all appropriate settings and their default values.
174948
def list_settings(self):
        
        result = super().list_settings()
        result.append((self.SETTING_BAR_FORMATING, {}))
        result.append((self.SETTING_BAR_CHAR, '='))
        result.append((self.SETTING_BAR_WIDTH, 0))
        return result
287511
def _get_defaults(func):
    """"""
    try:
        code = func.__code__
    except AttributeError:
        # Some built-in functions don't have __code__, __defaults__, etc.
        return {}
    pos_count = code.co_argcount
    arg_names = code.co_varnames
    arg_names = arg_names[:pos_count]
    defaults = func.__defaults__ or ()
    kwdefaults = func.__kwdefaults__
    res = dict(kwdefaults) if kwdefaults else {}
    pos_offset = pos_count - len(defaults)
    for name, value in zip(arg_names[pos_offset:], defaults):
        assert name not in res
        res[name] = value
    return res
927838
def settings(self) -> typing.Union[None, SharedCache]:
        """"""
        return self._project.settings if self._project else None
184892
def get_settings(self, service_id, version_number):
		""""""
		content = self._fetch("/service/%s/version/%d/settings" % (service_id, version_number))
		return FastlySettings(self, content)
872289
def get_default_values(data):
    """"""
    request = data.get('request')
    result = {}
    result['__datetime__'] = datetime.now()
    result['__ip_address__'] = request and get_ip(request) or '0.0.0.0'
    return result
1101735
def defaults(values={}):
    """"""
    if values: return values
    save_types = basestring, int, float, tuple, list, dict, type(None)
    for k, v in globals().items():
        if isinstance(v, save_types) and not k.startswith("_"): values[k] = v
    return values
1157206
def get_defaults_values(options = {})
      defaults_ = {}
      options[:columns].each do |column, config|
        defaults_[column.to_s] = @columns[column.to_sym][:default] || nil
      end
      defaults_
    end
636646
def settings(self):
        """"""
        if not hasattr(self, '_settings'):
            sett = self.connection.settings_dict.copy()
            sett.update(settings.CONNECTORS.get(self.database_name, {}))
            self._settings = sett
        return self._settings
236470
def gather_defaults(self):
        
        total_defaults = 0
        defaults_lines = []

        if not os.path.exists(self.paths["defaults"]):
            # reset the defaults if no defaults were found
            self.defaults = ""
            return 0

        file = open(self.paths["defaults"], "r")
        for line in file:
            if len(line) > 0:
                first_char = line[0]
            else:
                first_char = ""

            defaults_lines.append(line)

            if (first_char != "#" and first_char != "-" and
                    first_char != " " and
                    first_char != "\r" and
                    first_char != "\n" and
                    first_char != "\t"):
                total_defaults += 1
        file.close()

        self.defaults = "".join(defaults_lines)

        return total_defaults
232177
def list_settings(self):
        
        result = super().list_settings()
        result.append((self.SETTING_FLAG_HEADER, True))
        result.append((self.SETTING_HEADER_CONTENT, 'Notice'))
        result.append((self.SETTING_HEADER_FORMATING, {}))
        return result
280008
def settingsAsFacts(self, settings):
        
        pattern = re.compile('set\(([a-zA-Z0-9_]+),(\[a-zA-Z0-9_]+)\)')
        pairs = pattern.findall(settings)
        for name, val in pairs:
            self.set(name, val)
1201873
def get_config_items(self):
        
        return (
            ('settings', self.settings),
            ('context_class', self.context_class),
            ('interfaces', self.interfaces),
            ('logging', self.logging),
            ('name', self.name),
            ('init_handler', self.init_handler),
            ('sigusr1_handler', self.sigusr1_handler),
            ('sigusr2_handler', self.sigusr2_handler),
        )
199578
def list_settings(self):
        
        result = super().list_settings()
        result.append((self.SETTING_FLAG_BORDER, True))
        result.append((self.SETTING_BORDER_FORMATING, {}))
        result.append((self.SETTING_BORDER_STYLE, 'utf8.a'))
        return result
607493
def list(self):
        
        settings = []
        for setting in _SETTINGS:
            value = self.get(setting)
            is_set = self.is_set(setting)
            default_value = self.get_default_value(setting)
            is_supported = True
            settings.append((setting, value, default_value, is_set, is_supported))
        for setting in sorted(self.settings_state.list_keys()):
            if not self.is_supported(setting):
                value = self.get(setting)
                default_value = None
                is_set = True
                is_supported = False
                settings.append((setting, value, default_value, is_set, is_supported))
        return settings
184934
def _user_settings(self):
        
        user_settings = getattr(settings, self._name, {})
        if not user_settings and self._required:
            raise ImproperlyConfigured("Settings file is missing dict options with name {}".format(self._name))
        keys = frozenset(user_settings.keys())

        required = self._required - keys
        if required:
            raise ImproperlyConfigured("Following options for {} are missing from settings file: {}".format(self._name, ', '.join(sorted(required))))

        removed = keys & self._removed
        if removed:
            raise ImproperlyConfigured("Following options for {} have been removed: {}".format(self._name, ', '.join(sorted(removed))))

        return user_settings
1031882
def config(settings):
    
    parameter_settings = Parameter()
    for k, v in settings.items():
        if isinstance(v, OrderedDict):
            k_settings = Parameter()
            for ki, vi in v.items():
                k_settings[ki] = vi
        else:
            k_settings = v
        parameter_settings[k] = k_settings

    return parameter_settings
128625
def defaults(self):
        
        return {
            key: get_defaults(value)
            for key, value in self.all.items()
        }