Fix line vs column confusion in pylint checker
authorJulien Cristau <julien.cristau@logilab.fr>
Tue, 04 Nov 2014 14:56:04 +0100
changeset 1571 85eaa0b4425f
parent 1568 296942d2ed2a
child 1669 5e6dc151c85f
Fix line vs column confusion in pylint checker pylint 0.24 added column offset to its messages, meaning location[-1] is no longer the line number.
_narval/checkers/apycot/python.py
--- a/_narval/checkers/apycot/python.py	Fri Oct 17 15:06:31 2014 +0200
+++ b/_narval/checkers/apycot/python.py	Tue Nov 04 14:56:04 2014 +0100
@@ -552,7 +552,7 @@
             """ manage message of different type and in the context of path """
             if not msg_id[0] in self.categories:
                 return
-            path, line = location[0], location[-1]
+            path, line = location[0], location[3]
             path = path[self._to_remove:]
             if msg_id[0] == 'I':
                 self.writer.info(msg, path=path, line=line)