src/eric7/Globals/__init__.py

branch
eric7-maintenance
changeset 9549
67295777d9fe
parent 9449
c982bacca23f
parent 9482
a2bc06a54d9d
child 9654
7328efba128b
--- a/src/eric7/Globals/__init__.py	Mon Oct 31 14:07:57 2022 +0100
+++ b/src/eric7/Globals/__init__.py	Wed Nov 30 09:19:51 2022 +0100
@@ -18,12 +18,12 @@
 import sysconfig
 
 from PyQt6.QtCore import (
+    QT_VERSION,
     QByteArray,
     QCoreApplication,
     QDir,
     QLibraryInfo,
     QProcess,
-    QT_VERSION,
     qVersion,
 )
 
@@ -298,8 +298,6 @@
     @return path to the PyQt6 modules directory
     @rtype str
     """
-    import sysconfig
-
     pyqtPath = os.path.join(sysconfig.get_path("platlib"), "PyQt6")
     if os.path.exists(pyqtPath):
         return pyqtPath
@@ -317,6 +315,7 @@
     @rtype str
     """
     from eric7 import Preferences
+    from eric7.EricWidgets.EricApplication import ericApp
 
     toolsPath = ""
 
@@ -332,8 +331,6 @@
     if not toolsPath:
         program = "pylupdate{0}".format(version)
         if venvName:
-            from eric7.EricWidgets.EricApplication import ericApp
-
             venvManager = ericApp().getObject("VirtualEnvManager")
             dirName = venvManager.getVirtualenvDirectory(venvName)
         else:
@@ -384,7 +381,7 @@
     if not binPath:
         with contextlib.suppress(ImportError):
             # if qt6-applications is not installed just go to the next step
-            import qt6_applications
+            import qt6_applications  # __IGNORE_WARNING_I10__
 
             if libexec:
                 binPath = os.path.join(
@@ -620,9 +617,9 @@
     @rtype str
     """
     try:
-        from eric7.eric7config import getConfig
+        from eric7.eric7config import getConfig  # __IGNORE_WARNING_I101__
     except ImportError:
-        from eric7config import getConfig
+        from eric7config import getConfig  # __IGNORE_WARNING_I10__
 
     scriptPath = os.path.join(getConfig("ericDir"), "Tools", "webBrowserSupport.py")
     proc = QProcess()

eric ide

mercurial