src/eric7/WebBrowser/GreaseMonkey/GreaseMonkeyManager.py

branch
eric7
changeset 10436
f6881d10e995
parent 9653
e67609152c5e
child 10439
21c28b0f9e41
--- a/src/eric7/WebBrowser/GreaseMonkey/GreaseMonkeyManager.py	Fri Dec 22 13:57:47 2023 +0100
+++ b/src/eric7/WebBrowser/GreaseMonkey/GreaseMonkeyManager.py	Fri Dec 22 17:24:07 2023 +0100
@@ -47,7 +47,8 @@
         """
         Constructor
 
-        @param parent reference to the parent object (QObject)
+        @param parent reference to the parent object
+        @type QObject
         """
         super().__init__(parent)
 
@@ -149,7 +150,8 @@
         """
         Public method to get the path of the scripts directory.
 
-        @return path of the scripts directory (string)
+        @return path of the scripts directory
+        @rtype str
         """
         return os.path.join(Globals.getConfigDir(), "web_browser", "greasemonkey")
 
@@ -157,7 +159,8 @@
         """
         Public method to get the path of the scripts directory.
 
-        @return path of the scripts directory (string)
+        @return path of the scripts directory
+        @rtype str
         """
         return os.path.join(self.scriptsDirectory(), "requires")
 
@@ -165,8 +168,10 @@
         """
         Public method to get the sources of all required scripts.
 
-        @param urlList list of URLs (list of string)
-        @return sources of all required scripts (string)
+        @param urlList list of URLs
+        @type list of str
+        @return sources of all required scripts
+        @rtype str
         """
         requiresDir = QDir(self.requireScriptsDirectory())
         if not requiresDir.exists() or len(urlList) == 0:
@@ -204,7 +209,8 @@
         """
         Public method to get a list of all scripts.
 
-        @return list of all scripts (list of GreaseMonkeyScript)
+        @return list of all scripts (list o
+        @rtype GreaseMonkeyScript
         """
         return self.__scripts[:]
 
@@ -212,8 +218,10 @@
         """
         Public method to check, if the given script exists.
 
-        @param fullName full name of the script (string)
-        @return flag indicating the existence (boolean)
+        @param fullName full name of the script
+        @type str
+        @return flag indicating the existence
+        @rtype bool
         """
         return any(script.fullName() == fullName for script in self.__scripts)
 
@@ -221,7 +229,8 @@
         """
         Public method to enable the given script.
 
-        @param script script to be enabled (GreaseMonkeyScript)
+        @param script script to be enabled
+        @type GreaseMonkeyScript
         """
         script.setEnabled(True)
         fullName = script.fullName()
@@ -235,7 +244,8 @@
         """
         Public method to disable the given script.
 
-        @param script script to be disabled (GreaseMonkeyScript)
+        @param script script to be disabled
+        @type GreaseMonkeyScript
         """
         script.setEnabled(False)
         fullName = script.fullName()
@@ -251,8 +261,10 @@
         """
         Public method to add a script.
 
-        @param script script to be added (GreaseMonkeyScript)
-        @return flag indicating success (boolean)
+        @param script script to be added
+        @type GreaseMonkeyScript
+        @return flag indicating success
+        @rtype bool
         """
         if not script or not script.isValid():
             return False
@@ -270,10 +282,12 @@
         """
         Public method to remove a script.
 
-        @param script script to be removed (GreaseMonkeyScript)
+        @param script script to be removed
+        @type GreaseMonkeyScript
         @param removeFile flag indicating to remove the script file as well
-            (bool)
-        @return flag indicating success (boolean)
+        @type bool
+        @return flag indicating success
+        @rtype bool
         """
         if not script:
             return False
@@ -301,8 +315,10 @@
         """
         Public method to check, if scripts can be run on a scheme.
 
-        @param scheme scheme to check (string)
-        @return flag indicating, that scripts can be run (boolean)
+        @param scheme scheme to check
+        @type str
+        @return flag indicating, that scripts can be run
+        @rtype bool
         """
         return scheme in ["http", "https", "data", "ftp"]
 

eric ide

mercurial