diff options
Diffstat (limited to 'pylint/test/functional/nonlocal_without_binding.py')
-rw-r--r-- | pylint/test/functional/nonlocal_without_binding.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/pylint/test/functional/nonlocal_without_binding.py b/pylint/test/functional/nonlocal_without_binding.py new file mode 100644 index 0000000..2871ed6 --- /dev/null +++ b/pylint/test/functional/nonlocal_without_binding.py @@ -0,0 +1,20 @@ +""" Checks that reversed() receive proper argument """ +# pylint: disable=missing-docstring +# pylint: disable=too-few-public-methods,no-self-use,no-absolute-import,invalid-name,unused-variable + +def test(): + def parent(): + a = 42 + def stuff(): + nonlocal a + + def parent2(): + a = 42 + def stuff(): + def other_stuff(): + nonlocal a + +b = 42 +def func(): + def other_func(): + nonlocal b # [nonlocal-without-binding] |