<commit_before>"""
Pulls config values from environment variables. Checks to make sure we
have everything.
"""
import os
from future.moves.collections import UserDict


class ConfigStore(UserDict):
    """
    This is the container for your :py:class:`EnvironmentVariable` definitions,
    along with their eventual loaded config values. Once :py:meth:`load_values`
    is ran on an instance of this class, the config values are addressable
    via the Python dict API.
    """
    def __init__(self, evar_defs):
        """
        :param dict evar_defs: Pass in a dict whose keys are config
            names and the values are :py:class:`EnvironmentVariable`
            instances.
        """
        UserDict.__init__(self)
        self.evar_defs = evar_defs

    def load_values(self):
        """
        Go through the env var map, transferring the values to this object
        as attributes.<commit_msg>Replace UserDict with plain dict.<commit_after>"""
Pulls config values from environment variables. Checks to make sure we
have everything.
"""
import os


class ConfigStore(dict):
    """
    This is the container for your :py:class:`EnvironmentVariable` definitions,
    along with their eventual loaded config values. Once :py:meth:`load_values`
    is ran on an instance of this class, the config values are addressable
    via the Python dict API.
    """
    def __init__(self, evar_defs):
        """
        :param dict evar_defs: Pass in a dict whose keys are config
            names and the values are :py:class:`EnvironmentVariable`
            instances.
        """
        self.evar_defs = evar_defs

    def load_values(self):
        """
        Go through the env var map, transferring the values to this object
        as attributes.
{'fraction_non_alphanumeric': 0.07369614512471655, 'fraction_numerical': 0.0, 'mean_word_length': 2.8203463203463204, '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': '6387654', 'n_tokens_mistral': 469, 'n_tokens_neox': 458, 'n_words': 192}