--- a/src/eric7/CodeFormatting/IsortFormattingDialog.py Mon Oct 31 15:34:41 2022 +0100 +++ b/src/eric7/CodeFormatting/IsortFormattingDialog.py Mon Oct 31 16:31:29 2022 +0100 @@ -104,7 +104,7 @@ def __performAction(self): """ - Private method to execute the requested formatting action. + Private method to execute the requested sorting action. """ self.progressBar.setValue(0) self.progressBar.setVisible(True) @@ -123,9 +123,9 @@ files = self.__filterFiles(self.__filesList) if len(files) > 1: - self.__formatManyFiles(files) + self.__sortManyFiles(files) elif len(files) == 1: - self.__formatOneFile(files[0]) + self.__sortOneFile(files[0]) def __filterFiles(self, filesList): """ @@ -204,13 +204,13 @@ def __updateStatistics(self): """ - Private method to update the statistics about the recent formatting run and + Private method to update the statistics about the recent sorting run and make them visible. """ self.reformattedLabel.setText( - self.tr("Reformatted:") + self.tr("Resorted:") if self.__config["__action__"] is IsortFormattingAction.Sort - else self.tr("Would Reformat:") + else self.tr("Would Resort:") ) total = self.progressBar.maximum() @@ -266,10 +266,10 @@ if dataType == "error": EricMessageBox.critical( self, - self.tr("Formatting Failure"), - self.tr("<p>Formatting failed due to this error.</p><p>{0}</p>").format( - item.data(0, IsortFormattingDialog.DataRole) - ), + self.tr("Imports Sorting Failure"), + self.tr( + "<p>Imports sorting failed due to this error.</p><p>{0}</p>" + ).format(item.data(0, IsortFormattingDialog.DataRole)), ) elif dataType == "diff": if self.__diffDialog is None: @@ -304,7 +304,7 @@ def __handleIsortResult(self, filename, status, data=""): """ - Private method to handle an isort formatting result. + Private method to handle an isort sorting result. @param filename name of the processed file @type str @@ -368,10 +368,10 @@ QCoreApplication.processEvents() - def __formatManyFiles(self, files): + def __sortManyFiles(self, files): """ - Private method to format the list of files according the configuration using - multiple processes in parallel. + Private method to sort imports of the list of files according the configuration + using multiple processes in parallel. @param files list of files to be processed @type list of str @@ -402,7 +402,7 @@ # Start worker processes workers = [ multiprocessing.Process( - target=self.formattingWorkerTask, + target=self.sortingWorkerTask, args=(taskQueue, doneQueue, self.__isortConfig), ) for _ in range(NumberOfProcesses) @@ -436,7 +436,7 @@ self.__finish() @staticmethod - def formattingWorkerTask(inputQueue, outputQueue, isortConfig): + def sortingWorkerTask(inputQueue, outputQueue, isortConfig): """ Static method acting as the parallel worker for the formatting task. @@ -469,9 +469,10 @@ outputQueue.put(result) - def __formatOneFile(self, file): + def __sortOneFile(self, file): """ - Private method to format the list of files according the configuration. + Private method to sort the imports of the list of files according the + configuration. @param file name of the file to be processed @type str @@ -556,7 +557,7 @@ @dataclass class IsortStatistics: """ - Class containing the isort reformatting statistic data. + Class containing the isort statistic data. """ skippedCount: int = 0 @@ -569,7 +570,7 @@ @dataclass class IsortResult: """ - Class containing the isort reformatting result data. + Class containing the isort result data. """ status: str = ""