diff options
| author | Claudiu Popa <pcmanticore@gmail.com> | 2013-09-03 20:52:55 +0300 |
|---|---|---|
| committer | Claudiu Popa <pcmanticore@gmail.com> | 2013-09-03 20:52:55 +0300 |
| commit | a75e274e6bb219d545dda582a5dd1574cbc8cbcf (patch) | |
| tree | f87f8527fbe87ca10b280c99dc8b215141f94249 /checkers/variables.py | |
| parent | cc5640b3b9e587dc03750bbb2ed59312d6588af1 (diff) | |
| download | pylint-git-a75e274e6bb219d545dda582a5dd1574cbc8cbcf.tar.gz | |
Don't show the original lineno if the infered node has no lineno.
--HG--
branch : non_unpackable
Diffstat (limited to 'checkers/variables.py')
| -rw-r--r-- | checkers/variables.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/checkers/variables.py b/checkers/variables.py index 95c04df5f..bc56ec638 100644 --- a/checkers/variables.py +++ b/checkers/variables.py @@ -572,9 +572,9 @@ builtins. Remember that you should avoid to define new builtins when possible.' values = infered.itered() if len(targets) != len(values): if node.root().name == infered.root().name: - location = infered.lineno or node.lineno + location = infered.lineno or 'unknown' else: - location = '%s (%s)' % (infered.lineno or node.lineno, + location = '%s (%s)' % (infered.lineno or 'unknown', infered.root().name) self.add_message('unbalanced-tuple-unpacking', @@ -595,9 +595,9 @@ builtins. Remember that you should avoid to define new builtins when possible.' break else: if node.root().name == infered.root().name: - location = infered.lineno or node.lineno + location = infered.lineno or 'unknown' else: - location = '%s (%s)' % (infered.lineno or node.lineno, + location = '%s (%s)' % (infered.lineno or 'unknown', infered.root().name) self.add_message('unpacking-non-sequence', |
