scripts/install.py

branch
eric7
changeset 10042
ca636e8d80fd
parent 9986
2c571c1c7b0d
child 10046
35b27af462ef
diff -r 67c8efa6d098 -r ca636e8d80fd scripts/install.py
--- a/scripts/install.py	Fri May 19 16:01:22 2023 +0200
+++ b/scripts/install.py	Fri May 19 16:01:53 2023 +0200
@@ -222,7 +222,7 @@
     else:
         # determine dynamically
         try:
-            from PyQt6.QtCore import QLibraryInfo
+            from PyQt6.QtCore import QLibraryInfo  # noqa: I101, I102
 
             qtDataDir = QLibraryInfo.path(QLibraryInfo.LibraryPath.DataPath)
         except ImportError:
@@ -274,10 +274,10 @@
     """
     if os.path.exists(os.path.join("eric", "src", "eric7", "UI", "Info.py")):
         # Installing from installer archive
-        from eric.src.eric7.UI.Info import Version
+        from eric.src.eric7.UI.Info import Version  # noqa: I101, I102
     elif os.path.exists(os.path.join("src", "eric7", "UI", "Info.py")):
         # Installing from source tree
-        from src.eric7.UI.Info import Version
+        from src.eric7.UI.Info import Version  # noqa: I101, I102
     else:
         Version = "Unknown"
 
@@ -486,7 +486,7 @@
     global platBinDir
 
     try:
-        from eric7.Globals import getConfig
+        from eric7.Globals import getConfig  # noqa: I101
     except ImportError:
         # eric wasn't installed previously
         return
@@ -1187,7 +1187,7 @@
     # determine entry for DYLD_FRAMEWORK_PATH
     dyldLine = ""
     try:
-        from PyQt6.QtCore import QLibraryInfo
+        from PyQt6.QtCore import QLibraryInfo  # noqa: I101, I102
 
         qtLibraryDir = QLibraryInfo.path(QLibraryInfo.LibraryPath.LibrariesPath)
     except ImportError:
@@ -1225,10 +1225,10 @@
 
     if os.path.exists(os.path.join("eric", "eric7", "UI", "Info.py")):
         # Installing from archive
-        from eric.eric7.UI.Info import CopyrightShort, Version
+        from eric.eric7.UI.Info import CopyrightShort, Version  # noqa: I101, I102
     elif os.path.exists(os.path.join("eric7", "UI", "Info.py")):
         # Installing from source tree
-        from eric7.UI.Info import CopyrightShort, Version
+        from eric7.UI.Info import CopyrightShort, Version  # noqa: I101
     else:
         Version = "Unknown"
         CopyrightShort = "(c) 2002 - 2023 Detlev Offenbach"
@@ -1595,7 +1595,7 @@
     print("PyQt & Qt")
     print("---------")
     try:
-        from PyQt6.QtCore import qVersion
+        from PyQt6.QtCore import qVersion  # noqa: I101, I102
     except ImportError as err:
         msg = "'PyQt6' could not be detected.{0}".format(
             "\nError: {0}".format(err) if verbose else ""
@@ -1606,7 +1606,7 @@
         if installed:
             # try to import it again
             try:
-                from PyQt6.QtCore import qVersion
+                from PyQt6.QtCore import qVersion  # noqa: I101, I102
             except ImportError as msg:
                 print("Sorry, please install PyQt6.")
                 print("Error: {0}".format(msg))
@@ -1823,9 +1823,9 @@
     # ====================
     with contextlib.suppress(ImportError, AttributeError):
         try:
-            from PyQt6 import sip
+            from PyQt6 import sip  # noqa: I101, I102
         except ImportError:
-            import sip
+            import sip  # noqa: I101, I102
         print("sip:", sip.SIP_VERSION_STR.strip())
         # always assume, that snapshots or dev versions are new enough
         if "snapshot" not in sip.SIP_VERSION_STR and "dev" not in sip.SIP_VERSION_STR:
@@ -1850,7 +1850,7 @@
 
     # check version of PyQt6
     # ======================
-    from PyQt6.QtCore import PYQT_VERSION, PYQT_VERSION_STR
+    from PyQt6.QtCore import PYQT_VERSION, PYQT_VERSION_STR  # noqa: I101, I102
 
     print("PyQt6:", PYQT_VERSION_STR.strip())
     # always assume, that snapshots or dev versions are new enough
@@ -1876,7 +1876,7 @@
 
     # check version of QScintilla
     # ===========================
-    from PyQt6.Qsci import QSCINTILLA_VERSION, QSCINTILLA_VERSION_STR
+    from PyQt6.Qsci import QSCINTILLA_VERSION, QSCINTILLA_VERSION_STR  # noqa: I101, I102
 
     print("PyQt6-QScintilla:", QSCINTILLA_VERSION_STR.strip())
     # always assume, that snapshots or dev versions are new enough
@@ -1904,7 +1904,7 @@
         print("PyQt6-Charts:", QtCharts.PYQT_CHART_VERSION_STR)
 
     with contextlib.suppress(ImportError, AttributeError):
-        from PyQt6 import QtWebEngineCore
+        from PyQt6 import QtWebEngineCore  # noqa: I101, I102
 
         print("PyQt6-WebEngine:", QtWebEngineCore.PYQT_WEBENGINE_VERSION_STR)
 
@@ -1935,7 +1935,7 @@
         (defaults to None)
     @type func (optional)
     """
-    from PyQt6.uic import compileUi
+    from PyQt6.uic import compileUi  # noqa: I102
 
     py_dir, py_file = os.path.split(ui_path[:-3] + ".py")
 
@@ -2052,7 +2052,7 @@
     @rtype any
     """
     try:
-        import winreg  # __IGNORE_WARNING_I103__
+        import winreg  # noqa: I101, I103
     except ImportError:
         return None
 
@@ -2076,8 +2076,8 @@
     @param iconPath path of the icon file
     @type str
     """
-    from pywintypes import com_error
-    from win32com.client import Dispatch
+    from pywintypes import com_error  # noqa: I102
+    from win32com.client import Dispatch  # noqa: I102
 
     with contextlib.suppress(com_error):
         shell = Dispatch("WScript.Shell")
@@ -2419,4 +2419,4 @@
         raise
 
 #
-# eflag: noqa = M801, I101, I102
+# eflag: noqa = M801

eric ide

mercurial