--- a/src/eric7/Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py Fri Dec 22 19:45:17 2023 +0100 +++ b/src/eric7/Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py Sat Dec 23 15:40:23 2023 +0100 @@ -542,7 +542,8 @@ """ Protected slot implementing a close event handler. - @param e close event (QCloseEvent) + @param e close event + @type QCloseEvent """ if self.__hgClient.isExecuting(): self.__hgClient.cancel() @@ -660,8 +661,10 @@ """ Private method to calculate a color for a given branch name. - @param branchName name of the branch (string) - @return name of the color to use (string) + @param branchName name of the branch + @type str + @return name of the color to use + @rtype str """ if branchName not in self.__branchColors: self.__branchColors[branchName] = self.__getColor(len(self.__branchColors)) @@ -671,12 +674,14 @@ """ Private method to generate edge info for the give data. - @param rev revision to calculate edge info for (integer) - @param parents list of parent revisions (list of integers) + @param rev revision to calculate edge info for + @type int + @param parents list of parent revisions + @type list of int @return tuple containing the column and color index for the given node and a list of tuples indicating the edges between the given node and its parents - (integer, integer, [(integer, integer, integer), ...]) + @rtype tuple of (int, int, [(int, int, int), ...]) """ if rev not in self.__revs: # new head @@ -752,8 +757,10 @@ """ Local function to calculate a x-position for a column. - @param col column number (integer) - @param radius radius of the indicator circle (integer) + @param col column number + @type int + @param radius radius of the indicator circle + @type int """ return int(1.2 * radius) * col + radius // 2 + 3 @@ -837,8 +844,10 @@ Private method to get the parents of the currently viewed file/directory. - @param rev revision number to get parents for (string) - @return list of parent revisions (list of integers) + @param rev revision number to get parents for + @type str + @return list of parent revisions + @rtype list of int """ errMsg = "" parents = [-1] @@ -1088,8 +1097,10 @@ """ Private method to retrieve log entries from the repository. - @param startRev revision number to start from (integer, string) - @param noEntries number of entries to get (0 = default) (int) + @param startRev revision number to start from + @type int or str + @param noEntries number of entries to get (0 = default) + @type int """ self.buttonBox.button(QDialogButtonBox.StandardButton.Close).setEnabled(False) self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel).setEnabled(True) @@ -1244,8 +1255,10 @@ """ Private method to convert the displayed file name for a large file. - @param filename file name to be processed (string) - @return processed file name (string) + @param filename file name to be processed + @type str + @return processed file name + @rtype str """ if filename.startswith((self.LargefilesCacheL, self.LargefilesCacheW)): return self.tr("{0} (large file)").format( @@ -1466,7 +1479,8 @@ """ Private slot to show some error. - @param out error to be shown (string) + @param out error to be shown + @type str """ self.errorGroup.show() self.errors.insertPlainText(out) @@ -1476,7 +1490,8 @@ """ Private slot called by a button of the button box clicked. - @param button button that was clicked (QAbstractButton) + @param button button that was clicked + @type QAbstractButton """ if button == self.buttonBox.button(QDialogButtonBox.StandardButton.Close): self.close() @@ -1870,8 +1885,10 @@ """ Private slot called, when the current item of the log tree changes. - @param current reference to the new current item (QTreeWidgetItem) - @param previous reference to the old current item (QTreeWidgetItem) + @param current reference to the new current item + @type QTreeWidgetItem + @param previous reference to the old current item + @type QTreeWidgetItem """ self.__updateToolMenuActions() @@ -1943,7 +1960,8 @@ """ Private slot called, when the from date changes. - @param date new date (QDate) + @param date new date + @type QDate """ if self.__actionMode() == "filter": self.__filterLogs() @@ -1953,7 +1971,8 @@ """ Private slot called, when the from date changes. - @param date new date (QDate) + @param date new date + @type QDate """ if self.__actionMode() == "filter": self.__filterLogs() @@ -1985,7 +2004,8 @@ """ Private slot called, when a filter expression is entered. - @param txt filter expression (string) + @param txt filter expression + @type str """ if self.__actionMode() == "filter": self.__filterLogs() @@ -2053,7 +2073,8 @@ Private slot to prepare the filed search data. @return tuple of field index, search expression and flag indicating - that the field index is a data role (integer, string, boolean) + that the field index is a data role + @rtype tuple of (int, str, bool) """ indexIsRole = False txt = self.fieldCombo.itemData(self.fieldCombo.currentIndex()) @@ -2086,7 +2107,8 @@ """ Private slot called, when the stop on copy/move checkbox is clicked. - @param checked flag indicating the state of the check box (boolean) + @param checked flag indicating the state of the check box + @type bool """ self.vcs.getPlugin().setPreferences( "StopLogOnCopy", self.stopCheckBox.isChecked() @@ -2592,7 +2614,8 @@ """ Private method to get the selected action mode. - @return selected action mode (string, one of filter or find) + @return selected action mode (one of 'filter' or 'find') + @rtype str """ return self.modeComboBox.itemData(self.modeComboBox.currentIndex()) @@ -2601,7 +2624,8 @@ """ Private slot to react on mode changes. - @param index index of the selected entry (integer) + @param index index of the selected entry + @type int """ mode = self.modeComboBox.itemData(index) findMode = mode == "find" @@ -2638,8 +2662,10 @@ """ Private slot to find an item matching the entered criteria. - @param backwards flag indicating to search backwards (boolean) - @param interactive flag indicating an interactive search (boolean) + @param backwards flag indicating to search backwards + @type bool + @param interactive flag indicating an interactive search + @type bool """ self.__findBackwards = backwards @@ -2810,8 +2836,10 @@ """ Private slot called, when the current item of the files tree changes. - @param current reference to the new current item (QTreeWidgetItem) - @param previous reference to the old current item (QTreeWidgetItem) + @param current reference to the new current item + @type QTreeWidgetItem + @param previous reference to the old current item + @type QTreeWidgetItem """ if current: para = current.data(0, self.__diffFileLineRole)