<commit_before>
import sys

from django.conf import settings

from mezzanine.settings.models import Setting


registry = {}


def register_setting(name="", editable=False, description="", default=None):
    """
    Registers a setting that can be edited via the admin.
    """
    default = getattr(settings, "MEZZANINE_%s" % name, default)
    registry[name] = {"name": name, "description": description, "editable":
        editable, "default": default, "type": type(default)}


def editable_settings(names):
    """
    Returns the names of editable settings.
    """
    return [k for (k, v) in registry.items() if v["editable"] and k in names]


def load_settings(*names):
    """<commit_msg>Allow no names to be provided when calling editable_settings.<commit_after>
import sys

from django.conf import settings

from mezzanine.settings.models import Setting


registry = {}


def register_setting(name="", editable=False, description="", default=None):
    """
    Registers a setting that can be edited via the admin.
    """
    default = getattr(settings, "MEZZANINE_%s" % name, default)
    registry[name] = {"name": name, "description": description, "editable":
        editable, "default": default, "type": type(default)}


def editable_settings(names=None):
    """
    Returns the names of editable settings.
    """
    if names is None:
        names = registry.keys()
    return [k for (k, v) in registry.items() if v["editable"] and k in names]


def load_settings(*names):
    """
{'fraction_non_alphanumeric': 0.13008672448298866, 'fraction_numerical': 0.0, 'mean_word_length': 3.8701298701298703, 'pattern_counts': {'":': 10, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6790547', 'n_tokens_mistral': 447, 'n_tokens_neox': 436, 'n_words': 146}