28 ) |
28 ) |
29 |
29 |
30 from eric7 import Preferences, Utilities |
30 from eric7 import Preferences, Utilities |
31 from eric7.EricGui import EricPixmapCache |
31 from eric7.EricGui import EricPixmapCache |
32 from eric7.EricWidgets.EricApplication import ericApp |
32 from eric7.EricWidgets.EricApplication import ericApp |
|
33 from eric7.QScintilla.Editor import EditorWarningKind |
33 from eric7.SystemUtilities import FileSystemUtilities |
34 from eric7.SystemUtilities import FileSystemUtilities |
34 |
35 |
35 from . import CodeStyleCheckerUtilities, pycodestyle |
36 from . import CodeStyleCheckerUtilities, pycodestyle |
36 from .Annotations.AnnotationsCheckerDefaults import AnnotationsCheckerDefaultArgs |
37 from .Annotations.AnnotationsCheckerDefaults import AnnotationsCheckerDefaultArgs |
37 from .Miscellaneous.MiscellaneousDefaults import MiscellaneousCheckerDefaultArgs |
38 from .Miscellaneous.MiscellaneousDefaults import MiscellaneousCheckerDefaultArgs |
1568 |
1569 |
1569 if code in ["E901", "E902"]: |
1570 if code in ["E901", "E902"]: |
1570 editor.toggleSyntaxError(lineno, 0, True, message, True) |
1571 editor.toggleSyntaxError(lineno, 0, True, message, True) |
1571 else: |
1572 else: |
1572 editor.toggleWarning( |
1573 editor.toggleWarning( |
1573 lineno, 0, True, message, warningType=editor.WarningStyle |
1574 lineno, 0, True, message, warningType=EditorWarningKind.Style |
1574 ) |
1575 ) |
1575 |
1576 |
1576 editor.updateVerticalScrollBar() |
1577 editor.updateVerticalScrollBar() |
1577 |
1578 |
1578 @pyqtSlot() |
1579 @pyqtSlot() |
1604 for cindex in range(itm.childCount()): |
1605 for cindex in range(itm.childCount()): |
1605 citm = itm.child(cindex) |
1606 citm = itm.child(cindex) |
1606 lineno = citm.data(0, self.lineRole) |
1607 lineno = citm.data(0, self.lineRole) |
1607 message = citm.data(0, self.messageRole) |
1608 message = citm.data(0, self.messageRole) |
1608 editor.toggleWarning( |
1609 editor.toggleWarning( |
1609 lineno, 0, True, message, warningType=editor.WarningStyle |
1610 lineno, 0, True, message, warningType=EditorWarningKind.Style |
1610 ) |
1611 ) |
1611 |
1612 |
1612 # go through the list again to clear warning markers for files, |
1613 # go through the list again to clear warning markers for files, |
1613 # that are ok |
1614 # that are ok |
1614 openFiles = vm.getOpenFilenames() |
1615 openFiles = vm.getOpenFilenames() |