<commit_before>import os
import json

class Backdrop(dict):
    def __init__(self, project_name, directories=[]):
        directories.reverse()

        # first look into user's home directory
        directories.append(os.path.expanduser('~'))

        # then look into current directory
        directories.append(os.path.dirname(os.path.realpath(__file__)))

        directories.reverse()

        data = {}
        for directory in directories:
            file_name = "%s.json" % project_name
            file_path = os.path.join(directory, '.backdrop', file_name)
            if os.path.isfile(file_path):
                file = open(file_path)
                data.update(json.load(file))
                file.close()

        super(Backdrop, self).__init__(data)<commit_msg>We mean current WORKING directory, not current directory<commit_after>import os
import json

class Backdrop(dict):
    def __init__(self, project_name, directories=[]):
        directories.reverse()

        # first look into user's home directory
        directories.append(os.path.expanduser('~'))

        # then look into current directory
        directories.append(os.getcwd())

        directories.reverse()

        data = {}
        for directory in directories:
            file_name = "%s.json" % project_name
            file_path = os.path.join(directory, '.backdrop', file_name)
            if os.path.isfile(file_path):
                file = open(file_path)
                data.update(json.load(file))
                file.close()

        super(Backdrop, self).__init__(data)
{'fraction_non_alphanumeric': 0.10793650793650794, 'fraction_numerical': 0.0, 'mean_word_length': 2.2765072765072767, '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': '4360444', 'n_tokens_mistral': 449, 'n_tokens_neox': 424, 'n_words': 96}