summaryrefslogtreecommitdiff
path: root/pylint/test/functional/nonlocal_and_global.py
blob: 9400524367013edcaf663262a03535b8096bd17c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
"""Test that a name is both nonlocal and global in the same scope."""
# pylint: disable=missing-docstring,global-variable-not-assigned,invalid-name,nonlocal-without-binding

def bad(): # [nonlocal-and-global]
    nonlocal missing
    global missing

def good():
    nonlocal missing
    def test():
        global missing
    return test