--- a/src/eric7/QScintilla/Editor.py Wed Oct 26 17:32:49 2022 +0200 +++ b/src/eric7/QScintilla/Editor.py Wed Oct 26 18:47:23 2022 +0200 @@ -55,6 +55,7 @@ from eric7.UI import PythonDisViewer from eric7.CodeFormatting.BlackFormattingAction import BlackFormattingAction +from eric7.CodeFormatting.BlackUtilities import aboutBlack EditorAutoCompletionListID = 1 TemplateCompletionListID = 2 @@ -1045,6 +1046,10 @@ """ menu = QMenu(self.tr("Code Formatting")) + act = menu.addAction(self.tr("Black"), aboutBlack) + font = act.font() + font.setBold(True) + act.setFont(font) menu.addAction( self.tr("Format Code"), lambda: self.__performFormatWithBlack(BlackFormattingAction.Format), @@ -7825,8 +7830,8 @@ self.replaceSelectedText(replacementText) endIndex = ( startIndex + len(replacementText) - if len(replacementText.splitlines()) <= 1 else - len(replacementText.splitlines()[-1]) + if len(replacementText.splitlines()) <= 1 + else len(replacementText.splitlines()[-1]) ) self.setSelection(startLine, startIndex, endLine, endIndex) return