summaryrefslogtreecommitdiff
path: root/tests/functional/u/undefined/undefined_loop_variable_py38.py
blob: 5778df7d29e1b359b9b7582c855843dfe2b04088 (plain)
1
2
3
4
5
6
7
8
"""Tests for undefined-loop-variable with assignment expressions"""


def walrus_in_comprehension_test(container):
    """https://github.com/PyCQA/pylint/issues/7222"""
    for something in container:
        print(something)
    print([my_test for something in container if (my_test := something)])