src/eric7/VCS/VersionControl.py

branch
eric7
changeset 10069
435cc5875135
parent 9653
e67609152c5e
child 10436
f6881d10e995
--- a/src/eric7/VCS/VersionControl.py	Thu May 25 11:12:05 2023 +0200
+++ b/src/eric7/VCS/VersionControl.py	Thu May 25 19:51:47 2023 +0200
@@ -98,10 +98,10 @@
         """
         Public method used to shutdown the vcs interface.
 
-        @exception RuntimeError to indicate that this method must be
+        @exception NotImplementedError to indicate that this method must be
             implemented by a subclass
         """
-        raise RuntimeError("Not implemented")
+        raise NotImplementedError("Not implemented")
 
     def vcsExists(self):
         """
@@ -109,10 +109,10 @@
 
         @return tuple of flag indicating the existence and a string
             giving an error message in case of failure
-        @exception RuntimeError to indicate that this method must be
+        @exception NotImplementedError to indicate that this method must be
             implemented by a subclass
         """
-        raise RuntimeError("Not implemented")
+        raise NotImplementedError("Not implemented")
 
         return (False, "")
 
@@ -123,10 +123,10 @@
         @param vcsDir name of the VCS directory (string)
         @param noDialog flag indicating quiet operations (boolean)
         @return flag indicating success (boolean)
-        @exception RuntimeError to indicate that this method must be
+        @exception NotImplementedError to indicate that this method must be
             implemented by a subclass
         """
-        raise RuntimeError("Not implemented")
+        raise NotImplementedError("Not implemented")
 
         return False
 
@@ -141,10 +141,10 @@
         @type Project
         @param addAll flag indicating to add all files to the repository
         @type bool
-        @exception RuntimeError to indicate that this method must be
+        @exception NotImplementedError to indicate that this method must be
             implemented by a subclass
         """
-        raise RuntimeError("Not implemented")
+        raise NotImplementedError("Not implemented")
 
     def vcsImport(self, vcsDataDict, projectDir, noDialog=False, addAll=True):
         """
@@ -161,10 +161,10 @@
         @return tuple containing a flag indicating an execution without errors
             and a flag indicating the version control status
         @rtype tuple of (bool, bool)
-        @exception RuntimeError to indicate that this method must be
+        @exception NotImplementedError to indicate that this method must be
             implemented by a subclass
         """
-        raise RuntimeError("Not implemented")
+        raise NotImplementedError("Not implemented")
 
         return (False, False)
 
@@ -176,10 +176,10 @@
         @param projectDir project directory to create (string)
         @param noDialog flag indicating quiet operations
         @return flag indicating an execution without errors (boolean)
-        @exception RuntimeError to indicate that this method must be
+        @exception NotImplementedError to indicate that this method must be
             implemented by a subclass
         """
-        raise RuntimeError("Not implemented")
+        raise NotImplementedError("Not implemented")
 
         return False
 
@@ -190,10 +190,10 @@
         @param vcsDataDict dictionary of data required for the export
         @param projectDir project directory to create (string)
         @return flag indicating an execution without errors (boolean)
-        @exception RuntimeError to indicate that this method must be
+        @exception NotImplementedError to indicate that this method must be
             implemented by a subclass
         """
-        raise RuntimeError("Not implemented")
+        raise NotImplementedError("Not implemented")
 
         return False
 
@@ -206,10 +206,10 @@
         @param message message for this operation (string)
         @param noDialog flag indicating quiet operations (boolean)
         @return flag indicating success (boolean)
-        @exception RuntimeError to indicate that this method must be
+        @exception NotImplementedError to indicate that this method must be
             implemented by a subclass
         """
-        raise RuntimeError("Not implemented")
+        raise NotImplementedError("Not implemented")
 
         return False
 
@@ -219,10 +219,10 @@
 
         @return list of saved commit messages
         @rtype list of str
-        @exception RuntimeError to indicate that this method must be
+        @exception NotImplementedError to indicate that this method must be
             implemented by a subclass
         """
-        raise RuntimeError("Not implemented")
+        raise NotImplementedError("Not implemented")
 
         return []
 
@@ -251,10 +251,10 @@
 
         @param message message to be added
         @type str
-        @exception RuntimeError to indicate that this method must be
+        @exception NotImplementedError to indicate that this method must be
             implemented by a subclass
         """
-        raise RuntimeError("Not implemented")
+        raise NotImplementedError("Not implemented")
 
     def _vcsAddProjectCommitMessage(self, message):
         """
@@ -295,10 +295,10 @@
         """
         Public method to clear the list of saved messages.
 
-        @exception RuntimeError to indicate that this method must be
+        @exception NotImplementedError to indicate that this method must be
             implemented by a subclass
         """
-        raise RuntimeError("Not implemented")
+        raise NotImplementedError("Not implemented")
 
     def _vcsClearProjectCommitMessages(self):
         """
@@ -333,10 +333,10 @@
         @param noDialog flag indicating quiet operations (boolean)
         @return flag indicating, that the update contained an add
             or delete (boolean)
-        @exception RuntimeError to indicate that this method must be
+        @exception NotImplementedError to indicate that this method must be
             implemented by a subclass
         """
-        raise RuntimeError("Not implemented")
+        raise NotImplementedError("Not implemented")
 
         return False
 
@@ -347,10 +347,10 @@
         @param name file/directory name to be added (string)
         @param isDir flag indicating name is a directory (boolean)
         @param noDialog flag indicating quiet operations (boolean)
-        @exception RuntimeError to indicate that this method must be
+        @exception NotImplementedError to indicate that this method must be
             implemented by a subclass
         """
-        raise RuntimeError("Not implemented")
+        raise NotImplementedError("Not implemented")
 
     def vcsAddBinary(self, name, isDir=False):
         """
@@ -358,20 +358,20 @@
 
         @param name file/directory name to be added (string)
         @param isDir flag indicating name is a directory (boolean)
-        @exception RuntimeError to indicate that this method must be
+        @exception NotImplementedError to indicate that this method must be
             implemented by a subclass
         """
-        raise RuntimeError("Not implemented")
+        raise NotImplementedError("Not implemented")
 
     def vcsAddTree(self, path):
         """
         Public method to add a directory tree rooted at path in the vcs.
 
         @param path root directory of the tree to be added (string)
-        @exception RuntimeError to indicate that this method must be
+        @exception NotImplementedError to indicate that this method must be
             implemented by a subclass
         """
-        raise RuntimeError("Not implemented")
+        raise NotImplementedError("Not implemented")
 
     def vcsRemove(self, name, project=False, noDialog=False):
         """
@@ -381,10 +381,10 @@
         @param project flag indicating deletion of a project tree (boolean)
         @param noDialog flag indicating quiet operations
         @return flag indicating success (boolean)
-        @exception RuntimeError to indicate that this method must be
+        @exception NotImplementedError to indicate that this method must be
             implemented by a subclass
         """
-        raise RuntimeError("Not implemented")
+        raise NotImplementedError("Not implemented")
 
         return False
 
@@ -397,10 +397,10 @@
         @param target new name of the file/directory (string)
         @param noDialog flag indicating quiet operations
         @return flag indicating successfull operation (boolean)
-        @exception RuntimeError to indicate that this method must be
+        @exception NotImplementedError to indicate that this method must be
             implemented by a subclass
         """
-        raise RuntimeError("Not implemented")
+        raise NotImplementedError("Not implemented")
 
         return False
 
@@ -412,20 +412,20 @@
         @param name file/directory name to show the log for (string)
         @param isFile flag indicating log for a file is to be shown
             (boolean)
-        @exception RuntimeError to indicate that this method must be
+        @exception NotImplementedError to indicate that this method must be
             implemented by a subclass
         """
-        raise RuntimeError("Not implemented")
+        raise NotImplementedError("Not implemented")
 
     def vcsDiff(self, name):
         """
         Public method used to view the diff of a file/directory in the vcs.
 
         @param name file/directory name to be diffed (string)
-        @exception RuntimeError to indicate that this method must be
+        @exception NotImplementedError to indicate that this method must be
             implemented by a subclass
         """
-        raise RuntimeError("Not implemented")
+        raise NotImplementedError("Not implemented")
 
     def vcsSbsDiff(self, name, extended=False, revisions=None):
         """
@@ -438,30 +438,30 @@
         @type bool
         @param revisions tuple of two revisions
         @type tuple of two str
-        @exception RuntimeError to indicate that this method must be
+        @exception NotImplementedError to indicate that this method must be
             implemented by a subclass
         """
-        raise RuntimeError("Not implemented")
+        raise NotImplementedError("Not implemented")
 
     def vcsStatus(self, name):
         """
         Public method used to view the status of a file/directory in the vcs.
 
         @param name file/directory name to show the status for (string)
-        @exception RuntimeError to indicate that this method must be
+        @exception NotImplementedError to indicate that this method must be
             implemented by a subclass
         """
-        raise RuntimeError("Not implemented")
+        raise NotImplementedError("Not implemented")
 
     def vcsTag(self, name):
         """
         Public method used to set the tag of a file/directory in the vcs.
 
         @param name file/directory name to be tagged (string)
-        @exception RuntimeError to indicate that this method must be
+        @exception NotImplementedError to indicate that this method must be
             implemented by a subclass
         """
-        raise RuntimeError("Not implemented")
+        raise NotImplementedError("Not implemented")
 
     def vcsRevert(self, name):
         """
@@ -472,10 +472,10 @@
         @return flag indicating, that the update contained an add
             or delete
         @rtype bool
-        @exception RuntimeError to indicate that this method must be
+        @exception NotImplementedError to indicate that this method must be
             implemented by a subclass
         """
-        raise RuntimeError("Not implemented")
+        raise NotImplementedError("Not implemented")
 
         return False
 
@@ -485,10 +485,10 @@
 
         @param name file/directory name to be removed
         @type str or list of str
-        @exception RuntimeError to indicate that this method must be
+        @exception NotImplementedError to indicate that this method must be
             implemented by a subclass
         """
-        raise RuntimeError("Not implemented")
+        raise NotImplementedError("Not implemented")
 
     def vcsSwitch(self, name):
         """
@@ -497,10 +497,10 @@
         @param name directory name to be switched (string)
         @return flag indicating, that the switch contained an add
             or delete (boolean)
-        @exception RuntimeError to indicate that this method must be
+        @exception NotImplementedError to indicate that this method must be
             implemented by a subclass
         """
-        raise RuntimeError("Not implemented")
+        raise NotImplementedError("Not implemented")
 
         return False
 
@@ -509,10 +509,10 @@
         Public method used to merge a tag/branch into the local project.
 
         @param name file/directory name to be merged (string)
-        @exception RuntimeError to indicate that this method must be
+        @exception NotImplementedError to indicate that this method must be
             implemented by a subclass
         """
-        raise RuntimeError("Not implemented")
+        raise NotImplementedError("Not implemented")
 
     def vcsRegisteredState(self, name):
         """
@@ -521,10 +521,10 @@
         @param name filename to check (string)
         @return a combination of canBeCommited and canBeAdded or
             0 in order to signal an error
-        @exception RuntimeError to indicate that this method must be
+        @exception NotImplementedError to indicate that this method must be
             implemented by a subclass
         """
-        raise RuntimeError("Not implemented")
+        raise NotImplementedError("Not implemented")
 
         return 0
 
@@ -537,10 +537,10 @@
         @param dname directory to check in (string)
         @return the received dictionary completed with a combination of
             canBeCommited and canBeAdded or None in order to signal an error
-        @exception RuntimeError to indicate that this method must be
+        @exception NotImplementedError to indicate that this method must be
             implemented by a subclass
         """
-        raise RuntimeError("Not implemented")
+        raise NotImplementedError("Not implemented")
 
         return {}
 
@@ -549,10 +549,10 @@
         Public method returning the name of the vcs.
 
         @return name of the vcs (string)
-        @exception RuntimeError to indicate that this method must be
+        @exception NotImplementedError to indicate that this method must be
             implemented by a subclass
         """
-        raise RuntimeError("Not implemented")
+        raise NotImplementedError("Not implemented")
 
         return ""
 
@@ -561,20 +561,20 @@
         Public method used to cleanup the local copy.
 
         @param name directory name to be cleaned up (string)
-        @exception RuntimeError to indicate that this method must be
+        @exception NotImplementedError to indicate that this method must be
             implemented by a subclass
         """
-        raise RuntimeError("Not implemented")
+        raise NotImplementedError("Not implemented")
 
     def vcsCommandLine(self, name):
         """
         Public method used to execute arbitrary vcs commands.
 
         @param name directory name of the working directory (string)
-        @exception RuntimeError to indicate that this method must be
+        @exception NotImplementedError to indicate that this method must be
             implemented by a subclass
         """
-        raise RuntimeError("Not implemented")
+        raise NotImplementedError("Not implemented")
 
     def vcsOptionsDialog(self, project, archive, editable=False, parent=None):
         """
@@ -585,10 +585,10 @@
         @param editable flag indicating that the project name is editable
             (boolean)
         @param parent parent widget (QWidget)
-        @exception RuntimeError to indicate that this method must be
+        @exception NotImplementedError to indicate that this method must be
             implemented by a subclass
         """
-        raise RuntimeError("Not implemented")
+        raise NotImplementedError("Not implemented")
 
     def vcsNewProjectOptionsDialog(self, parent=None):
         """
@@ -596,10 +596,10 @@
         new project.
 
         @param parent parent widget (QWidget)
-        @exception RuntimeError to indicate that this method must be
+        @exception NotImplementedError to indicate that this method must be
             implemented by a subclass
         """
-        raise RuntimeError("Not implemented")
+        raise NotImplementedError("Not implemented")
 
     def vcsRepositoryInfos(self, ppath):
         """
@@ -607,10 +607,10 @@
 
         @param ppath local path to get the repository infos (string)
         @return string with ready formated info for display (string)
-        @exception RuntimeError to indicate that this method must be
+        @exception NotImplementedError to indicate that this method must be
             implemented by a subclass
         """
-        raise RuntimeError("Not implemented")
+        raise NotImplementedError("Not implemented")
 
         return ""
 
@@ -624,10 +624,10 @@
         @param isTranslationsBrowser flag indicating, the helper is requested
             for the translations browser (this needs some special treatment)
         @return the project browser helper object
-        @exception RuntimeError to indicate that this method must be
+        @exception NotImplementedError to indicate that this method must be
             implemented by a subclass
         """
-        raise RuntimeError("Not implemented")
+        raise NotImplementedError("Not implemented")
 
         return None  # __IGNORE_WARNING_M831__
 
@@ -637,10 +637,10 @@
 
         @param project reference to the project object
         @return the project helper object
-        @exception RuntimeError to indicate that this method must be
+        @exception NotImplementedError to indicate that this method must be
             implemented by a subclass
         """
-        raise RuntimeError("Not implemented")
+        raise NotImplementedError("Not implemented")
 
         return None  # __IGNORE_WARNING_M831__
 
@@ -736,7 +736,7 @@
             if key in dictionary:
                 self.otherData[key] = dictionary[key]
 
-    def vcsResolved(self, name):
+    def vcsResolved(self, name):  # noqa: U100
         """
         Public method used to resolve conflicts of a file/directory.
 
@@ -1020,7 +1020,7 @@
         if self.statusMonitorThread is not None:
             self.statusMonitorThread.clearCachedState(name)
 
-    def _createStatusMonitorThread(self, interval, project):
+    def _createStatusMonitorThread(self, interval, project):  # noqa: U100
         """
         Protected method to create an instance of the VCS status monitor
         thread.

eric ide

mercurial