--- a/PluginPyLint.py Tue Oct 25 10:58:33 2022 +0200 +++ b/PluginPyLint.py Tue Dec 20 19:44:49 2022 +0100 @@ -7,27 +7,33 @@ Module implementing the PyLint plug-in. """ -import re +import contextlib +import copy import os -import copy import platform -import contextlib +import re -from PyQt6.QtCore import QObject, QTranslator, QCoreApplication, QProcess +from PyQt6.QtCore import QCoreApplication, QObject, QProcess, QTranslator from PyQt6.QtWidgets import QDialog -from eric7 import Preferences, Utilities +from eric7 import Preferences from eric7.EricGui.EricAction import EricAction from eric7.EricWidgets import EricMessageBox from eric7.EricWidgets.EricApplication import ericApp from eric7.Project.ProjectBrowserModel import ProjectBrowserFileItem +try: + from eric7.SystemUtilities.OSUtilities import getEnvironmentEntry, isWindowsPlatform +except ImportError: + # imports for eric < 23.1 + from eric7.Utilities import getEnvironmentEntry, isWindowsPlatform + # Start-of-Header name = "PyLint Plugin" author = "Detlev Offenbach <detlev@die-offenbachs.de>" autoactivate = True deactivateable = True -version = "10.1.1" +version = "10.2.0" className = "PyLintPlugin" packageName = "PyLintInterface" shortDescription = "Show the PyLint dialogs." @@ -115,7 +121,7 @@ return [] executables = set() - if Utilities.isWindowsPlatform(): + if isWindowsPlatform(): # # Windows # @@ -189,7 +195,7 @@ if not executables and majorVersion >= 3: # check the PATH environment variable if nothing was found # Python 3 only - path = Utilities.getEnvironmentEntry("PATH") + path = getEnvironmentEntry("PATH") if path: dirs = path.split(os.pathsep) for directory in dirs: @@ -210,7 +216,7 @@ scriptSuffixes.append("-python{0}.{1}".format(majorVersion, minorVersion)) # There could be multiple pylint executables in the path # e.g. for different python variants - path = Utilities.getEnvironmentEntry("PATH") + path = getEnvironmentEntry("PATH") # environment variable not defined if path is None: return []