PluginPyLint.py

changeset 83
59597e4c8fa9
parent 82
5493d105d329
child 85
6124794c3ffe
diff -r 5493d105d329 -r 59597e4c8fa9 PluginPyLint.py
--- a/PluginPyLint.py	Wed Jan 01 11:58:51 2020 +0100
+++ b/PluginPyLint.py	Mon May 04 17:51:25 2020 +0200
@@ -35,7 +35,7 @@
 author = "Detlev Offenbach <detlev@die-offenbachs.de>"
 autoactivate = True
 deactivateable = True
-version = "6.1.11"
+version = "6.2.0"
 className = "PyLintPlugin"
 packageName = "PyLint"
 shortDescription = "Show the PyLint dialogs."
@@ -70,7 +70,7 @@
         "versionStartsWith": 'dummypylint',
         "versionPosition": -1,
         "version": "",
-        "versionCleanup": (0, -1),
+        "versionCleanup": None,
     }
     if _checkProgram():
         for exePath in (exePy2[0], exePy3[0]):
@@ -103,7 +103,6 @@
         for line in output.splitlines():
             if versionRe.search(line):
                 version = line.split()[-1]
-                version = version[:-1]
                 break
     return version
 
@@ -187,6 +186,18 @@
                     if exePaths:
                         for exePath in exePaths:
                             executables.add(exePath)
+        
+        if not executables and majorVersion >= 3:
+            # check the PATH environment variable if nothing was found
+            # Python 3 only
+            path = Utilities.getEnvironmentEntry('PATH')
+            if path:
+                dirs = path.split(os.pathsep)
+                for directory in dirs:
+                    for suffix in (".bat", ".exe"):
+                        exe = os.path.join(directory, "pylint" + suffix)
+                        if os.access(exe, os.X_OK):
+                            executables.add(exe)
     else:
         #
         # Linux, Unix ...

eric ide

mercurial