diff options
author | cpopa <devnull@localhost> | 2014-07-08 15:24:45 +0300 |
---|---|---|
committer | cpopa <devnull@localhost> | 2014-07-08 15:24:45 +0300 |
commit | fac1865c061d62ddd5a8473a6f6d3fed9134d047 (patch) | |
tree | 76b90ee28571e0abb4e166b457613800095154a3 /test | |
parent | 59accca5013b2fcb4c03eecbd7d5e4a7f3892c1c (diff) | |
download | pylint-fac1865c061d62ddd5a8473a6f6d3fed9134d047.tar.gz |
Fix a false positive with unbalanced iterable unpacking, when encountering starred nodes. Closes issue #273.
Diffstat (limited to 'test')
-rw-r--r-- | test/input/func_noerror_unbalanced_tuple_unpacking_py30.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/input/func_noerror_unbalanced_tuple_unpacking_py30.py b/test/input/func_noerror_unbalanced_tuple_unpacking_py30.py new file mode 100644 index 0000000..68f5fb7 --- /dev/null +++ b/test/input/func_noerror_unbalanced_tuple_unpacking_py30.py @@ -0,0 +1,11 @@ +""" Test that using starred nodes in unpacking +does not trigger a false positive on Python 3. +""" + +__revision__ = 1 + +def test(): + """ Test that starred expressions don't give false positives. """ + first, second, *last = (1, 2, 3, 4) + *last, = (1, 2) + return (first, second, last) |