<commit_before># -*- coding: utf-8 -*-


class AttributeDescriptor(object):

    def __init__(self, name, types=None, min=None):
        self._name = name
        self._types = types
        self._min = min

    def __get__(self, instance, owner):
        return getattr(instance, self._name)

    def __set__(self, instance, value):
        if self._types and not any([isinstance(value, t) for t in self._types]):
            raise TypeError('expected type ϵ {{{}}}, {} ({!r}) given'.format(
                ', '.join([t.__name__ for t in self._types]),
                type(value).__name__,
                value,
            ))
        if self._min and not self._min <= value:
            raise ValueError('expected value >= {!r}, {!r} given'.format(
                self._min,
                value,
            ))
        setattr(instance, self._name, value)<commit_msg>format<commit_after># -*- coding: utf-8 -*-


class AttributeDescriptor(object):

    def __init__(self, name, types=None, min=None):
        self._name = name
        self._types = types
        self._min = min

    def __get__(self, instance, owner):
        return getattr(instance, self._name)

    def __set__(self, instance, value):
        if self._types and not any([isinstance(value, t) for t in self._types]):
            raise TypeError('expected type ϵ {{{}}}, {} ({!r}) given'.format(
                ', '.join([t.__name__ for t in self._types]),
                type(value).__name__,
                value,
            ))
        elif self._min and not self._min <= value:
            raise ValueError('expected value >= {!r}, {!r} given'.format(
                self._min,
                value,
            ))
        else:
            setattr(instance, self._name, value)
{'fraction_non_alphanumeric': 0.13556437889960296, 'fraction_numerical': 0.0011344299489506524, 'mean_word_length': 1.8729641693811074, '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': '4284312', 'n_tokens_mistral': 505, 'n_tokens_neox': 483, 'n_words': 134}