diff options
| author | Claudiu Popa <pcmanticore@gmail.com> | 2013-08-30 15:14:43 +0300 |
|---|---|---|
| committer | Claudiu Popa <pcmanticore@gmail.com> | 2013-08-30 15:14:43 +0300 |
| commit | 38ecd54a5cc5ed90ef20c991781c9703e813c81c (patch) | |
| tree | 69f3563a71994a89bd14216f92396fa67eefd3fa /checkers/variables.py | |
| parent | adf408990e5f96746b0e25617110a31dd227c8ce (diff) | |
| download | pylint-git-38ecd54a5cc5ed90ef20c991781c9703e813c81c.tar.gz | |
Add more context informations regarding the unpacked sequence location.
--HG--
branch : non_unpackable
Diffstat (limited to 'checkers/variables.py')
| -rw-r--r-- | checkers/variables.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/checkers/variables.py b/checkers/variables.py index f358f91c1..9a6d92534 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 |
