<commit_before>from ._compat import PY2

if PY2:
    import ConfigParser as configparser
else:
    import configparser


class Parser(configparser.RawConfigParser):

    def __remove_quotes(self, value):
        quotes = ["'", "\""]
        for quote in quotes:
            if value[0] == quote and value[-1] == quote:
                return value.strip(quote)
        return value

    def get(self, section, option):
        value = configparser.RawConfigParser.get(self, section, option)
        return self.__remove_quotes(value)
<commit_msg>Update logic<commit_after>from ._compat import PY2

if PY2:
    import ConfigParser as configparser
else:
    import configparser


class Parser(configparser.RawConfigParser):

    def __remove_quotes(self, value):
        quotes = ["'", "\""]
        for quote in quotes:
            if len(value) >= 2 and value[0] == value[-1] == quote:
                return value[1:-1]
        return value

    def get(self, section, option):
        value = configparser.RawConfigParser.get(self, section, option)
        return self.__remove_quotes(value)

{'fraction_non_alphanumeric': 0.10329067641681901, 'fraction_numerical': 0.010054844606946984, 'mean_word_length': 2.699324324324324, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '3475383', 'n_tokens_mistral': 324, 'n_tokens_neox': 318, 'n_words': 88}