<commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals

import re
from collections import namedtuple

from . import formatters

Node = namedtuple('Node', 'title class_name module_name')


def parse_node(nodeid):
    node_parts = nodeid.split('::')
    title = formatters.format_title(node_parts[-1])
    module_name = formatters.format_module_name(
        re.sub('.py$', '', node_parts[0]).replace('/', '.')
    )

    class_name = node_parts[-2]
    if '()' not in class_name:
        class_name = None
    else:
        class_name = formatters.format_class_name(node_parts[-3])

    return Node(title, class_name, module_name)<commit_msg>Remove unecessary string formatting in the parsers module<commit_after># -*- coding: utf-8 -*-
from __future__ import unicode_literals

import re
from collections import namedtuple

from . import formatters

Node = namedtuple('Node', 'title class_name module_name')


def parse_node(nodeid):
    node_parts = nodeid.split('::')
    title = formatters.format_title(node_parts[-1])
    module_name = formatters.format_module_name(node_parts[0])

    class_name = node_parts[-2]
    if '()' not in class_name:
        class_name = None
    else:
        class_name = formatters.format_class_name(node_parts[-3])

    return Node(title, class_name, module_name)
{'fraction_non_alphanumeric': 0.1172465960665658, 'fraction_numerical': 0.007564296520423601, 'mean_word_length': 3.973684210526316, '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': '7216575', 'n_tokens_mistral': 425, 'n_tokens_neox': 414, 'n_words': 96}