diff options
| author | Sylvain Thénault <sylvain.thenault@logilab.fr> | 2013-02-25 12:00:10 +0100 |
|---|---|---|
| committer | Sylvain Thénault <sylvain.thenault@logilab.fr> | 2013-02-25 12:00:10 +0100 |
| commit | 37b07b305fb190df034b2810d47e194938fc26ce (patch) | |
| tree | 47261a9f1eae0512b4b45c4d4a9ee1553c23e914 /checkers/variables.py | |
| parent | 2e57298846aeb72b589329f63af434bf9d74f398 (diff) | |
| download | pylint-git-37b07b305fb190df034b2810d47e194938fc26ce.tar.gz | |
use .fromlineno instead of .lineno (which is not reliable)
Diffstat (limited to 'checkers/variables.py')
| -rw-r--r-- | checkers/variables.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/checkers/variables.py b/checkers/variables.py index cf5d9f7b4..ff9a1d954 100644 --- a/checkers/variables.py +++ b/checkers/variables.py @@ -1,4 +1,4 @@ -# Copyright (c) 2003-2012 LOGILAB S.A. (Paris, FRANCE). +# Copyright (c) 2003-2013 LOGILAB S.A. (Paris, FRANCE). # http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This program is free software; you can redistribute it and/or modify it under @@ -272,7 +272,7 @@ builtins. Remember that you should avoid to define new builtins when possible.' if is_inside_except(stmt): continue if name in globs and not isinstance(stmt, astng.Global): - line = globs[name][0].lineno + line = globs[name][0].fromlineno self.add_message('W0621', args=(name, line), node=stmt) elif is_builtin(name): # do not print Redefining builtin for additional builtins |
