--- a/src/eric7/CodeFormatting/BlackFormattingDialog.py Tue Dec 06 17:35:41 2022 +0100 +++ b/src/eric7/CodeFormatting/BlackFormattingDialog.py Tue Dec 06 17:42:24 2022 +0100 @@ -73,8 +73,6 @@ super().__init__(parent) self.setupUi(self) - self.progressBar.setMaximum(len(filesList)) - self.resultsList.header().setSortIndicator(1, Qt.SortOrder.AscendingOrder) self.__config = copy.deepcopy(configuration) @@ -101,6 +99,7 @@ """ Private method to execute the requested formatting action. """ + self.progressBar.setMaximum(len(self.__filesList)) self.progressBar.setValue(0) self.progressBar.setVisible(True)