<commit_before>"""Configuration parser and class-wrapper."""
import sys
import os
import re
import ConfigParser


def get_config_files(component=None, component_only=False):
    """
    Returns the list of file paths.

    :param str component: Set to load a specific component (INI file).
    :rtype: `list`
    :return: `list` of `str`.
    """
    # List paths
    cfg_dir_paths = [
        os.path.join(sys.prefix, 'ice-config'),
        os.path.join('/etc/ice'),
        os.path.expanduser('~/.ice')
    ]
    env_paths_str = os.environ.get('ICE_CONFIG_PATHS')
    if env_paths_str is not None:
        env_paths = env_paths_str.split(':')
        for path in env_paths:
            cfg_dir_paths.append(os.path.abspath(path))

    # Build the list
    ret_val = []
    for cfg_dir_path in cfg_dir_paths:
        if not component_only:
            file_path = os.path.join(cfg_dir_path, 'ice.ini')
            if os.path.isfile(file_path):
                ret_val.append(file_path)

        if component is not None:
            file_path = os.path.join(cfg_dir_path, '%s.ini' % component)
            if os.path.isfile(file_path):
                ret_val.append(file_path)

    return ret_val


def get_configuration(component=None):<commit_msg>Complies with change in config files path<commit_after>"""Configuration parser and class-wrapper."""
import sys
import os
import re
import ConfigParser


def get_config_files(component=None, component_only=False):
    """
    Returns the list of file paths.

    :param str component: Set to load a specific component (INI file).
    :rtype: `list`
    :return: `list` of `str`.
    """
    # List paths
    cfg_dir_paths = [
        os.path.join(sys.prefix, 'etc', 'ice'),
        os.path.join(sys.prefix, 'local', 'etc', 'ice'),
        os.path.join('/etc/ice'),
        os.path.expanduser('~/.ice')
    ]
    env_paths_str = os.environ.get('ICE_CONFIG_PATHS')
    if env_paths_str is not None:
        env_paths = env_paths_str.split(':')
        for path in env_paths:
            cfg_dir_paths.append(os.path.abspath(path))

    # Build the list
    ret_val = []
    for cfg_dir_path in cfg_dir_paths:
        if not component_only:
            file_path = os.path.join(cfg_dir_path, 'ice.ini')
            if os.path.isfile(file_path):
                ret_val.append(file_path)

        if component is not None:
            file_path = os.path.join(cfg_dir_path, '%s.ini' % component)
            if os.path.isfile(file_path):
                ret_val.append(file_path)

    return ret_val


def get_configuration(component=None):
{'fraction_non_alphanumeric': 0.11635098569771937, 'fraction_numerical': 0.0, 'mean_word_length': 2.525885558583106, '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': '599184', 'n_tokens_mistral': 848, 'n_tokens_neox': 833, 'n_words': 194}