<commit_before># mode: run
# tag: typeinference

cimport cython


def test_outer_inner_double():
    """
    >>> print(test_outer_inner_double())
    double
    """
    x = 1.0
    def inner():
        nonlocal x
        x = 2.0
    inner()
    assert x == 2.0
    return cython.typeof(x)


def test_outer_inner_double_int():
    """
    >>> print(test_outer_inner_double_int())
    ('double', 'double')
    """
    x = 1.0
    y = 2
    def inner():
        nonlocal x, y
        x = 1
        y = 2.0
    inner()
    return cython.typeof(x), cython.typeof(y)


def test_outer_inner_pyarg():
    """
    >>> print(test_outer_inner_pyarg())
    2<commit_msg>improve error output in test case<commit_after># mode: run
# tag: typeinference

cimport cython


def test_outer_inner_double():
    """
    >>> print(test_outer_inner_double())
    double
    """
    x = 1.0
    def inner():
        nonlocal x
        x = 2.0
    inner()
    assert x == 2.0, str(x)
    return cython.typeof(x)


def test_outer_inner_double_int():
    """
    >>> print(test_outer_inner_double_int())
    ('double', 'double')
    """
    x = 1.0
    y = 2
    def inner():
        nonlocal x, y
        x = 1
        y = 2.0
    inner()
    return cython.typeof(x), cython.typeof(y)


def test_outer_inner_pyarg():
    """
    >>> print(test_outer_inner_pyarg())
    2
{'fraction_non_alphanumeric': 0.140625, 'fraction_numerical': 0.019345238095238096, 'mean_word_length': 2.225419664268585, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 21, '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': '6708759', 'n_tokens_mistral': 503, 'n_tokens_neox': 480, 'n_words': 107}