--- a/src/eric7/QScintilla/Editor.py Sat Sep 02 12:33:58 2023 +0200 +++ b/src/eric7/QScintilla/Editor.py Sat Sep 02 15:50:01 2023 +0200 @@ -147,7 +147,8 @@ mouseDoubleClick = pyqtSignal(QPoint, Qt.MouseButton) WarningCode = 1 - WarningStyle = 2 + WarningPython = 2 + WarningStyle = 3 # Autocompletion icon definitions ClassID = 1 @@ -6231,9 +6232,13 @@ _fn, lineno, col, code, msg = error self.toggleSyntaxError(lineno, col, True, msg) + warnings = problems.get("py_warnings", []) + for _fn, lineno, col, _code, msg in warnings: + self.toggleWarning(lineno, col, True, msg, warningType=Editor.WarningPython) + warnings = problems.get("warnings", []) for _fn, lineno, col, _code, msg in warnings: - self.toggleWarning(lineno, col, True, msg) + self.toggleWarning(lineno, col, True, msg, warningType=Editor.WarningCode) self.updateVerticalScrollBar() @@ -6801,6 +6806,7 @@ Public slot to clear all pyflakes warnings. """ self.__clearTypedWarning(Editor.WarningCode) + self.__clearTypedWarning(Editor.WarningPython) def clearStyleWarnings(self): """ @@ -6813,7 +6819,7 @@ Private method to clear warnings of a specific kind. @param warningKind kind of warning to clear (Editor.WarningCode, - Editor.WarningStyle) + Editor.WarningPython, Editor.WarningStyle) """ for handle in list(self.warnings.keys()): warnings = [] @@ -6927,8 +6933,10 @@ for handle in self.warnings: if self.markerLine(handle) == line: for msg, warningType in self.warnings[handle]: - if warningType == self.WarningStyle: + if warningType == Editor.WarningStyle: styleAnnotations.append(self.tr("Style: {0}").format(msg)) + elif warningType == Editor.WarningPython: + warningAnnotations.append(msg) else: warningAnnotations.append( self.tr("Warning: {0}").format(msg)