<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Path management."""
from __future__ import print_function, unicode_literals, absolute_import

import os
from . import helpers

__paths = {}


def register(name, *path_elms):
    """Registers a path constructed by <path_elms> under <name>.
    If multiple path elements are given, the last
    element will undergo case correction (see helpers.identify_folder_name)."""
    if len(path_elms) > 1:
        __paths[name] = helpers.identify_folder_name(os.path.join(
            *path_elms[:-1]), path_elms[-1])
    else:
        __paths[name] = path_elms[0]


def get(name, *paths):
    """Returns the path registered under <name>, or an empty string if <name>
    is not known."""
    try:
        base = __paths[name]
    except KeyError:
        base = ''
    return os.path.join(base, paths)


def clear():
    """Clears the path cache."""
    __paths.clear()<commit_msg>paths.get: fix unpacking<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Path management."""
from __future__ import print_function, unicode_literals, absolute_import

import os
from . import helpers

__paths = {}


def register(name, *path_elms):
    """Registers a path constructed by <path_elms> under <name>.
    If multiple path elements are given, the last
    element will undergo case correction (see helpers.identify_folder_name)."""
    if len(path_elms) > 1:
        __paths[name] = helpers.identify_folder_name(os.path.join(
            *path_elms[:-1]), path_elms[-1])
    else:
        __paths[name] = path_elms[0]


def get(name, *paths):
    """Returns the path registered under <name>, or an empty string if <name>
    is not known."""
    try:
        base = __paths[name]
    except KeyError:
        base = ''
    return os.path.join(base, *paths)


def clear():
    """Clears the path cache."""
    __paths.clear()
{'fraction_non_alphanumeric': 0.1321656050955414, 'fraction_numerical': 0.005307855626326964, 'mean_word_length': 3.2075892857142856, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, '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': '6147865', 'n_tokens_mistral': 613, 'n_tokens_neox': 595, 'n_words': 177}