<commit_before>import inspect

def argspec_set(func):
    if not hasattr(func, 'argspec'):
        func.argspec = inspect.getargspec(func)

def argspec_iscompat(func, lenargs):
    spec = func.argspec
    minargs = len(spec.args) - len(spec.defaults or ())
    maxargs = len(spec.args) if spec.varargs is None else None
    return lenargs >= minargs and (maxargs is None or lenargs <= maxargs)

class ArgCountError(Exception):
    pass<commit_msg>Simplify funcion arg compatibility check<commit_after>import inspect

def argspec_set(func):
    if not hasattr(func, 'argspec'):
        func.argspec = inspect.getargspec(func)

def argspec_iscompat(func, lenargs):
    spec = func.argspec
    minargs = len(spec.args) - len(spec.defaults or ())
    maxargs = len(spec.args) if spec.varargs is None else float("infinity")
    return minargs <= lenargs <= maxargs

class ArgCountError(Exception):
    pass
{'fraction_non_alphanumeric': 0.10654827968923418, 'fraction_numerical': 0.0, 'mean_word_length': 4.039106145251397, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 4, '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': '6967886', 'n_tokens_mistral': 288, 'n_tokens_neox': 283, 'n_words': 77}