<commit_before>from functools import update_wrapper
import logging
import sys
from .config import Configurable, Directive
from .compat import with_metaclass
from .framehack import get_frame_info


class Registry(Configurable):
    """A registry holding an application's configuration.
    """
    app = None  # app this registry belongs to. set later during scanning

    def __init__(self, name, bases, testing_config):
        self.name = name
        bases = [base.configurations for base in bases
                 if hasattr(base, 'configurations')]
        Configurable.__init__(self, bases, testing_config)


class AppMeta(type):
    def __new__(cls, name, bases, d):
        testing_config = d.get('testing_config')
        d['configurations'] = Registry(name, bases, testing_config)
        return super(AppMeta, cls).__new__(cls, name, bases, d)
<commit_msg>Remove Registry subclass as we can use Configurable directly.<commit_after>from functools import update_wrapper
import logging
import sys
from .config import Configurable, Directive
from .compat import with_metaclass
from .framehack import get_frame_info


class AppMeta(type):
    def __new__(cls, name, bases, d):
        testing_config = d.get('testing_config')
        extends = [base.configurations for base in bases
                   if hasattr(base, 'configurations')]
        d['configurations'] = Configurable(extends, testing_config)
        return super(AppMeta, cls).__new__(cls, name, bases, d)

{'fraction_non_alphanumeric': 0.08468834688346884, 'fraction_numerical': 0.0, 'mean_word_length': 3.764516129032258, 'pattern_counts': {'":': 0, '<': 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': '299357', 'n_tokens_mistral': 410, 'n_tokens_neox': 402, 'n_words': 134}