PluginPyright.py

branch
eric7
changeset 3
109b8e5513d8
parent 1
191e9ec72893
child 9
1ef1797f5f58
diff -r 772534d88459 -r 109b8e5513d8 PluginPyright.py
--- a/PluginPyright.py	Tue Nov 07 15:30:32 2023 +0100
+++ b/PluginPyright.py	Tue Nov 07 16:45:04 2023 +0100
@@ -10,12 +10,13 @@
 import contextlib
 import os
 
-from PyQt6.QtCore import QObject, QTranslator, pyqtSlot
+from PyQt6.QtCore import QCoreApplication, QObject, QTranslator, pyqtSlot
 
 from eric7 import Preferences
 from eric7.EricGui.EricAction import EricAction
 from eric7.EricWidgets.EricApplication import ericApp
 from eric7.Project.ProjectBrowserModel import ProjectBrowserFileItem
+from eric7.SystemUtilities import PythonUtilities
 
 # Start-Of-Header
 __header__ = {
@@ -36,6 +37,31 @@
 error = ""  # noqa: U200
 
 
+def exeDisplayData():
+    """
+    Public method to support the display of some executable info.
+
+    @return dictionary containing the data to query the presence of
+        the executable
+    @rtype dict
+    """
+    data = {
+        "programEntry": True,
+        "header": QCoreApplication.translate(
+            "PyrightPlugin", "Checkers - Pyright"
+        ),
+        "exe": PythonUtilities.getPythonExecutable(),
+        "versionCommand": "--version",
+        "versionStartsWith": "pyright",
+        "versionPosition": -1,
+        "version": "",
+        "versionCleanup": None,
+        "exeModule": ["-m", "pyright"]
+    }
+
+    return data
+
+
 def prepareUninstall():
     """
     Module function to prepare for an uninstallation.

eric ide

mercurial