diff options
author | Claudiu Popa <pcmanticore@gmail.com> | 2019-01-30 19:00:17 +0100 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2019-01-30 19:00:17 +0100 |
commit | cee1d98c9e29c7f7cef3447cf477d1da3e0c3be2 (patch) | |
tree | d3fc0100264b4bb7f60106795565fe8e09f5a066 | |
parent | 87e02d1e3dda74a085c0871a132610b7d06d1490 (diff) | |
download | pylint-git-cee1d98c9e29c7f7cef3447cf477d1da3e0c3be2.tar.gz |
Move the unused variable regression test to a Python 3.6 specific file
-rw-r--r-- | pylint/test/functional/unused_variable.py | 13 | ||||
-rw-r--r-- | pylint/test/functional/unused_variable_py36.py | 13 | ||||
-rw-r--r-- | pylint/test/functional/unused_variable_py36.rc | 2 | ||||
-rw-r--r-- | pylint/test/functional/unused_variable_py36.txt | 0 |
4 files changed, 15 insertions, 13 deletions
diff --git a/pylint/test/functional/unused_variable.py b/pylint/test/functional/unused_variable.py index cbf18fb8e..4e6d58fe4 100644 --- a/pylint/test/functional/unused_variable.py +++ b/pylint/test/functional/unused_variable.py @@ -53,16 +53,3 @@ def locals_does_not_account_for_subscopes(): def unused_import_from(): from functools import wraps as abc # [unused-import] from collections import namedtuple # [unused-import] - - -def function(): - ann: int = 0 - assign = 0 - - def inner(): - nonlocal ann, assign - ann += 1 - assign += 1 - return ann + assign - - return inner() diff --git a/pylint/test/functional/unused_variable_py36.py b/pylint/test/functional/unused_variable_py36.py new file mode 100644 index 000000000..396d02805 --- /dev/null +++ b/pylint/test/functional/unused_variable_py36.py @@ -0,0 +1,13 @@ +# pylint: disable=missing-docstring + +def function(): + ann: int = 0 + assign = 0 + + def inner(): + nonlocal ann, assign + ann += 1 + assign += 1 + return ann + assign + + return inner() diff --git a/pylint/test/functional/unused_variable_py36.rc b/pylint/test/functional/unused_variable_py36.rc new file mode 100644 index 000000000..0ba2b6333 --- /dev/null +++ b/pylint/test/functional/unused_variable_py36.rc @@ -0,0 +1,2 @@ +[testoptions] +min_pyver=3.6 diff --git a/pylint/test/functional/unused_variable_py36.txt b/pylint/test/functional/unused_variable_py36.txt new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/pylint/test/functional/unused_variable_py36.txt |