src/eric7/Plugins/VcsPlugins/vcsGit/GitDiffGenerator.py

branch
eric7
changeset 10438
4cd7e5a8b3cf
parent 10069
435cc5875135
child 10439
21c28b0f9e41
diff -r 2f70ca07f0af -r 4cd7e5a8b3cf src/eric7/Plugins/VcsPlugins/vcsGit/GitDiffGenerator.py
--- a/src/eric7/Plugins/VcsPlugins/vcsGit/GitDiffGenerator.py	Fri Dec 22 19:45:17 2023 +0100
+++ b/src/eric7/Plugins/VcsPlugins/vcsGit/GitDiffGenerator.py	Sat Dec 23 15:40:23 2023 +0100
@@ -28,7 +28,9 @@
         Constructor
 
         @param vcs reference to the vcs object
-        @param parent parent widget (QWidget)
+        @type Git
+        @param parent parent widget
+        @type QWidget
         """
         super().__init__(parent)
 
@@ -69,9 +71,10 @@
         """
         Public slot to start the git diff command.
 
-        @param fn filename to be diffed (string)
-        @param versions list of versions to be diffed (list of up to 2 strings
-            or None)
+        @param fn filename to be diffed
+        @type str
+        @param versions list of versions to be diffed
+        @type list of up to 2 str or None
         @param diffMode indication for the type of diff to be performed (
             'work2repo' compares the working tree with the HEAD commit,
             'work2stage' compares the working tree with the staging area,
@@ -79,8 +82,11 @@
             'work2stage2repo' compares the working tree with the staging area
                 and the staging area with the HEAD commit,
             'stash' shows the diff for a stash)
-        @param stashName name of the stash to show a diff for (string)
-        @return flag indicating the start status (boolean)
+        @type str
+        @param stashName name of the stash to show a diff for
+        @type str
+        @return flag indicating the start status
+        @rtype bool
         @exception ValueError raised to indicate a bad value for the 'diffMode'
             parameter.
         """
@@ -166,8 +172,10 @@
         """
         Private slot connected to the finished signal.
 
-        @param exitCode exit code of the process (integer)
-        @param exitStatus exit status of the process (QProcess.ExitStatus)
+        @param exitCode exit code of the process
+        @type int
+        @param exitStatus exit status of the process
+        @type QProcess.ExitStatus
         """
         if (
             self.__process.state() == QProcess.ProcessState.NotRunning
@@ -183,6 +191,7 @@
             between stage and repo for 'work2stage2repo' mode (empty
             otherwise), the list of errors and a list of tuples of filenames
             and the line into the diff output.
+        @rtype tuple of (list of str, list of str, list of str, list of (str, int))
         """
         return (self.__output1, self.__output2, self.__errors, self.__fileSeparators)
 
@@ -190,9 +199,11 @@
         """
         Private slot to process a line giving the old/new file.
 
-        @param line line to be processed (string)
+        @param line line to be processed
+        @type str
         @param isTopDiff flag indicating to show the output in the top
-            output widget (boolean)
+            output widget
+        @type bool
         """
         prefix, filenames = line.split(" a/", 1)
         oldFile, newFile = filenames.split(" b/", 1)
@@ -209,9 +220,11 @@
         """
         Private method to process one line of output.
 
-        @param line output line to process (string)
+        @param line output line to process
+        @type str
         @param isTopDiff flag indicating to show the output in the top
-            output widget (boolean)
+            output widget
+        @type bool
         """
         if line.startswith("diff --git"):
             self.__processFileLine(line, isTopDiff)

eric ide

mercurial