<commit_before>#!/usr/bin/env python2.7

from __future__ import print_function

"""
    Copyright (c) 2012, <NAME>
    All rights reserved.
    Licensed under BSD 3 clause license, see LICENSE file for details.
"""

import sys

import platform
current_os = platform.system()
if current_os == 'Darwin':
    def DereferenceVar(in_var):
        return "".join(("${", in_var, "}"))
elif current_os == 'Windows':
    def DereferenceVar(in_var):
        return "".join(("%", in_var, "%"))


class ConfigVar(object):
    """ Keep a single, named, config variable and it's values.
        Also info about where it came from (file, line).
        value may have $() style references to other variables.
        Values are always a list - even a single value is a list of size 1
        Emulates list container
    """
    __slots__ = ("__name", "__description", "__values", "__resolving_in_progress")

    def __init__(self, name, description="", *values):
        self.__name = name
        self.__description = description
        self.__values = map(str, values)
        self.__resolving_in_progress = False  # prevent circular resolves

    def name(self):
        """ return the name of this variable """
        return self.__name

    def description(self):
        """ return the description of this variable """
        return self.__description

    def set_description(self, description):
        """ Assign new description """
        self.__description = str(description)

    def __str__(self):
        ln = '\n'
        indent = "    "
        retVal = "{self._ConfigVar__name}:{ln}{indent}description:{self._ConfigVar__description}{ln}{indent}values:{self._ConfigVar__values})".format(**locals())
        return retVal

    def __repr__(self):
        retVal = self.__str__()
        return retVal
<commit_msg>better docs string<commit_after>#!/usr/bin/env python2.7

from __future__ import print_function

"""
    Copyright (c) 2012, <NAME>
    All rights reserved.
    Licensed under BSD 3 clause license, see LICENSE file for details.
"""

import sys

import platform
current_os = platform.system()
if current_os == 'Darwin':
    def DereferenceVar(in_var):
        return "".join(("${", in_var, "}"))
elif current_os == 'Windows':
    def DereferenceVar(in_var):
        return "".join(("%", in_var, "%"))


class ConfigVar(object):
    """ Keep a single, named, config variable and it's values.
        Also info about where it came from (file, line).
        value may have $() style references to other variables.
        Values are always a list - even a single value is a list of size 1.
        Values are kept as strings and are converted to strings upon append/extend.
        ConfigVar Emulates a list container
    """
    __slots__ = ("__name", "__description", "__values", "__resolving_in_progress")

    def __init__(self, name, description="", *values):
        self.__name = name
        self.__description = description
        self.__values = map(str, values)
        self.__resolving_in_progress = False  # prevent circular resolves

    def name(self):
        """ return the name of this variable """
        return self.__name

    def description(self):
        """ return the description of this variable """
        return self.__description

    def set_description(self, description):
        """ Assign new description """
        self.__description = str(description)

    def __str__(self):
        ln = '\n'
        indent = "    "
        retVal = "{self._ConfigVar__name}:{ln}{indent}description:{self._ConfigVar__description}{ln}{indent}values:{self._ConfigVar__values})".format(**locals())
        return retVal

    def __repr__(self):
        retVal = self.__str__()
        return retVal

{'fraction_non_alphanumeric': 0.11536402569593147, 'fraction_numerical': 0.004282655246252677, 'mean_word_length': 2.933684210526316, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '7279598', 'n_tokens_mistral': 1053, 'n_tokens_neox': 1015, 'n_words': 330}