[gnome-code-assistance] python: fix pylint



commit 013c8314f57a8e96ad959a5235e6712fa262c092
Author: Elad Alfassa <elad fedoraproject org>
Date:   Sat Oct 28 01:27:44 2017 +0300

    python: fix pylint
    
    in some recent pylint version, the output was changed to include
    sapartor lines made out of minus signs.
    
    the pylint code in gnome-code-assistance assumed any line returned
    from pylint would have ":" in it, and that change in pylint broke
    that assumption.
    
    with this commit, we only process pylint lines if they have ":"
    in them, which means we ignore any output that doesn't contain
    diagnostics.

 backends/python/__init__.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/backends/python/__init__.py b/backends/python/__init__.py
index 8dc2cf2..7694dd8 100644
--- a/backends/python/__init__.py
+++ b/backends/python/__init__.py
@@ -36,7 +36,7 @@ class PyLint(object):
         self.data_path = data_path
 
     def write(self, st):
-        if st != "\n" and not st.startswith("*"):
+        if st != "\n" and not st.startswith("*") and ":" in st:
             result = st.split(":")
             col = int(result[1]) + 1
             loc = types.SourceLocation(line=result[0], column=col)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]