1 first = None2 found = False3 for first in context.body:4 if first is node:5 continue6- if first.scope() is node.scope() and first.lineno > node.lineno:7+ if first.scope() is node.scope() and first.fromlineno > node.fromlineno:8 continue9 if isinstance(first, astng.Import):10 if any(fullname == iname[0] for iname in first.names):11 found = True12 break

diff --git a/checkers/utils.py b/checkers/utils.py

@@ -1,8 +1,8 @@

13 # pylint: disable=W061114 #15-# Copyright (c) 2003-2010 LOGILAB S.A. (Paris, FRANCE).16+# Copyright (c) 2003-2013 LOGILAB S.A. (Paris, FRANCE).17 # http://www.logilab.fr/ -- mailto:contact@logilab.fr18 #19 # This program is free software; you can redistribute it and/or modify it under20 # the terms of the GNU General Public License as published by the Free Software21 # Foundation; either version 2 of the License, or (at your option) any later

34-# Copyright (c) 2003-2012 LOGILAB S.A. (Paris, FRANCE).35+# Copyright (c) 2003-2013 LOGILAB S.A. (Paris, FRANCE).36 # http://www.logilab.fr/ -- mailto:contact@logilab.fr37 #38 # This program is free software; you can redistribute it and/or modify it under39 # the terms of the GNU General Public License as published by the Free Software40 # Foundation; either version 2 of the License, or (at your option) any later