fixed PY-4358 Tuple assignment balance is incorrect: extend inspection for sequnce literals other then tuples

This commit is contained in:
Ekaterina Tuzova
2011-12-02 18:14:35 +01:00
parent 07efb8bff8
commit 14744182f4
5 changed files with 30 additions and 5 deletions

View File

@@ -10,4 +10,9 @@
<line>2</line>
<description>Need more values to unpack</description>
</problem>
<problem>
<file>test.py</file>
<line>5</line>
<description>Need more values to unpack</description>
</problem>
</problems>

View File

@@ -10,6 +10,11 @@
<line>2</line>
<description>Need more values to unpack</description>
</problem>
<problem>
<file>test.py</file>
<line>5</line>
<description>Need more values to unpack</description>
</problem>
<problem>
<file>test.py</file>
<line>8</line>

View File

@@ -6,4 +6,10 @@ a, b = <warning descr="Too many values to unpack">c</warning>
#PY-4360
(a, b) = <warning descr="Too many values to unpack">1, 2, 3</warning>
(a, b) = <warning descr="Too many values to unpack">(1, 2, 3)</warning>
(a, b) = <warning descr="Too many values to unpack">(1, 2, 3)</warning>
#PY-4358
a, b = <warning descr="Too many values to unpack">[1, 2, 3]</warning>
a, b = <warning descr="Need more values to unpack">'str'</warning>
a, b = <warning descr="Too many values to unpack">{1, 2, 3}</warning>
a, b = <warning descr="Too many values to unpack">{1:2, 2: 3, 3:4}</warning>