summaryrefslogtreecommitdiff
path: root/checkers/variables.py
diff options
context:
space:
mode:
authorcpopa <devnull@localhost>2013-08-30 15:14:43 +0300
committercpopa <devnull@localhost>2013-08-30 15:14:43 +0300
commit122972308e541ff15a351d6c25ad495e2de4639c (patch)
treee2880a51f08e04cc996fed21ee60ae02bbc1025d /checkers/variables.py
parentf09017aab057531c07fe6d36d411bc48c914d380 (diff)
downloadpylint-122972308e541ff15a351d6c25ad495e2de4639c.tar.gz
Add more context informations regarding the unpacked sequence location.
Diffstat (limited to 'checkers/variables.py')
-rw-r--r--checkers/variables.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/checkers/variables.py b/checkers/variables.py
index f358f91..9a6d925 100644
--- a/checkers/variables.py
+++ b/checkers/variables.py
@@ -119,7 +119,7 @@ MSGS = {
a list comprehension or a generator expression) is used outside \
the loop.'),
- 'W0632': ('Possible unbalanced tuple unpacking: '
+ 'W0632': ('Possible unbalanced tuple unpacking with sequence at line %d: '
'left side has %d label(s), right side has %d value(s)',
'unbalanced-tuple-unpacking',
'Used when there is an unbalanced tuple unpacking in assignment'),
@@ -571,7 +571,9 @@ builtins. Remember that you should avoid to define new builtins when possible.'
if len(targets) != len(values):
self.add_message('unbalanced-tuple-unpacking',
node=node,
- args=(len(targets), len(values)))
+ args=(infered.lineno,
+ len(targets),
+ len(values)))
else:
if infered is astroid.YES:
continue