<commit_before>def method_or_none(instance, name):
    method = getattr(instance, name)
    if (name[0:2] == '__' and name[-2,:] == '__') or \
                                    not callable(method) :
        return None
    return method
       
def action_check(obj):
    return (hasattr(obj, '__readonly'), 
            hasattr(obj, '__unlocked'),
            hasattr(obj, '__abort_exception')) 

def inject(obj, name, dependency):
    obj.__dict__[name] = dependency
<commit_msg>remove trailing spaces<commit_after>def method_or_none(instance, name):
    method = getattr(instance, name)
    if (name[0:2] == '__' and name[-2,:] == '__') or \
                                    not callable(method) :
        return None
    return method

def action_check(obj):
    return (hasattr(obj, '__readonly'),
            hasattr(obj, '__unlocked'),
            hasattr(obj, '__abort_exception'))

def inject(obj, name, dependency):
    obj.__dict__[name] = dependency

{'fraction_non_alphanumeric': 0.1322314049586777, 'fraction_numerical': 0.006198347107438017, 'mean_word_length': 2.485611510791367, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6667278', 'n_tokens_mistral': 300, 'n_tokens_neox': 293, 'n_words': 66}