--- a/src/eric7/Project/ProjectBaseBrowser.py Wed Dec 20 15:42:44 2023 +0100 +++ b/src/eric7/Project/ProjectBaseBrowser.py Wed Dec 20 19:28:22 2023 +0100 @@ -166,7 +166,8 @@ """ Protected slot to show the context menu. - @param coord the position of the mouse pointer (QPoint) + @param coord the position of the mouse pointer + @type QPoint """ if not self.project.isOpen(): return @@ -186,7 +187,8 @@ """ Protected method to select a single item. - @param index index of item to be selected (QModelIndex) + @param index index of item to be selected + @type QModelIndex """ if index.isValid(): self.setCurrentIndex(index) @@ -200,8 +202,10 @@ """ Protected method to set the selection status of an item. - @param index index of item to set (QModelIndex) - @param selected flag giving the new selection status (boolean) + @param index index of item to set + @type QModelIndex + @param selected flag giving the new selection status + @type bool """ if index.isValid(): self.selectionModel().select( @@ -212,9 +216,12 @@ """ Protected method to set the selection status of a range of items. - @param startIndex start index of range of items to set (QModelIndex) - @param endIndex end index of range of items to set (QModelIndex) - @param selected flag giving the new selection status (boolean) + @param startIndex start index of range of items to set + @type QModelIndex + @param endIndex end index of range of items to set + @type QModelIndex + @param selected flag giving the new selection status + @type bool """ selection = QItemSelection(startIndex, endIndex) self.selectionModel().select( @@ -225,9 +232,12 @@ """ Private slot called after rows have been inserted into the model. - @param parent parent index of inserted rows (QModelIndex) - @param start start row number (integer) - @param end end row number (integer) + @param parent parent index of inserted rows + @type QModelIndex + @param start start row number + @type int + @param end end row number + @type int """ self._resizeColumns() @@ -357,7 +367,8 @@ """ Public method to highlight a node given its filename. - @param fn filename of file to be highlighted (string) + @param fn filename of file to be highlighted + @type str """ newfn = os.path.abspath(fn) newfn = self.project.getRelativePath(newfn) @@ -372,8 +383,10 @@ """ Public method to highlight a node given its filename. - @param fn filename of file to be highlighted (string) - @param lineno one based line number of the item (integer) + @param fn filename of file to be highlighted + @type str + @param lineno one based line number of the item + @type int """ newfn = os.path.abspath(fn) newfn = self.project.getRelativePath(newfn) @@ -483,7 +496,8 @@ It enables/disables the VCS menu entries depending on the overall VCS status and the file status. - @param menu reference to the menu to be shown (QMenu) + @param menu reference to the menu to be shown + @type QMenu """ if self.project.vcs is None: for act in self.menuActions: @@ -499,7 +513,8 @@ It enables/disables the VCS menu entries depending on the overall VCS status and the files status. - @param menu reference to the menu to be shown (QMenu) + @param menu reference to the menu to be shown + @type QMenu """ if self.project.vcs is None: for act in self.multiMenuActions: @@ -514,7 +529,8 @@ It enables/disables the VCS menu entries depending on the overall VCS status and the directory status. - @param menu reference to the menu to be shown (QMenu) + @param menu reference to the menu to be shown + @type QMenu """ if self.project.vcs is None: for act in self.dirMenuActions: @@ -529,7 +545,8 @@ It enables/disables the VCS menu entries depending on the overall VCS status and the directory status. - @param menu reference to the menu to be shown (QMenu) + @param menu reference to the menu to be shown + @type QMenu """ if self.project.vcs is None: for act in self.dirMultiMenuActions: @@ -541,7 +558,8 @@ """ Protected slot called before the context menu is shown. - @param menu reference to the menu to be shown (QMenu) + @param menu reference to the menu to be shown + @type QMenu """ # nothing to do for now return @@ -551,8 +569,10 @@ Protected method to select entries based on their VCS status. @param local flag indicating local (i.e. non VCS controlled) - file/directory entries should be selected (boolean) + file/directory entries should be selected + @type boolean) @param filterList list of classes to check against + @type Class """ if self.project.vcs is None: return @@ -636,7 +656,8 @@ """ Public method to get the file/directory names of all expanded items. - @return list of expanded items names (list of string) + @return list of expanded items names + @rtype list of str """ expandedNames = [] @@ -654,7 +675,8 @@ """ Public method to expand items given their names. - @param names list of item names to be expanded (list of string) + @param names list of item names to be expanded + @type list of str """ model = self.model() for name in names: @@ -671,7 +693,8 @@ """ Protected slot to handle the prepareRepopulateItem signal. - @param name relative name of file item to be repopulated (string) + @param name relative name of file item to be repopulated + @type str """ itm = self.currentItem() if itm is not None: @@ -697,7 +720,8 @@ """ Protected slot to handle the completeRepopulateItem signal. - @param name relative name of file item to be repopulated (string) + @param name relative name of file item to be repopulated + @type str """ sindex = self._model.itemIndexByName(name) if sindex.isValid(): @@ -733,6 +757,7 @@ Public method to get a reference to the current item. @return reference to the current item + @rtype BrowserItem """ itm = self.model().item(self.currentIndex()) return itm @@ -801,7 +826,8 @@ """ Private method to check a hook key. - @param key key of the hook to check (string) + @param key key of the hook to check + @type str @exception KeyError raised to indicate an invalid hook """ if len(self.hooks) == 0: @@ -814,8 +840,10 @@ """ Public method to add a hook method to the dictionary. - @param key for the hook method (string) - @param method reference to the hook method (method object) + @param key for the hook method + @type str + @param method reference to the hook method + @type function """ self.__checkHookKey(key) self.hooks[key] = method @@ -824,9 +852,12 @@ """ Public method to add a hook method to the dictionary. - @param key for the hook method (string) - @param method reference to the hook method (method object) - @param menuEntry entry to be shown in the context menu (string) + @param key for the hook method + @type str + @param method reference to the hook method + @type function + @param menuEntry entry to be shown in the context menu + @type str """ self.addHookMethod(key, method) self.hooksMenuEntries[key] = menuEntry @@ -835,7 +866,8 @@ """ Public method to remove a hook method from the dictionary. - @param key for the hook method (string) + @param key for the hook method + @type str """ self.__checkHookKey(key) self.hooks[key] = None