<commit_before>import re


def get_field(doc: str, name: str):
    match = re.search(':{}: (.*)$'.format(name), doc, re.IGNORECASE | re.MULTILINE)
    if match:
        return match.group(1).strip()


class TestVersion:
    def test_version_is_consistent(self):
        from .. import VERSION

        with open('README.rst') as f:
            readme = f.read()

            version = get_field(readme, 'version')
            version = version.split('.')
            version = tuple([int(i) for i in version])

        assert VERSION == version
<commit_msg>Use `map` to test version<commit_after>import re


def get_field(doc: str, name: str):
    match = re.search(':{}: (.*)$'.format(name), doc, re.IGNORECASE | re.MULTILINE)
    if match:
        return match.group(1).strip()


class TestVersion:
    def test_version_is_consistent(self):
        from .. import VERSION

        with open('README.rst') as f:
            readme = f.read()

            version = get_field(readme, 'version')
            version = tuple(map(int, version.split('.')))

        assert VERSION == version

{'fraction_non_alphanumeric': 0.14154411764705882, 'fraction_numerical': 0.001838235294117647, 'mean_word_length': 2.4571428571428573, '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': '7028845', 'n_tokens_mistral': 353, 'n_tokens_neox': 341, 'n_words': 87}