eric6/Plugins/PluginCodeStyleChecker.py

changeset 7613
382f89c11e27
parent 7610
df7025fe26a3
child 7635
0cdead130a81
--- a/eric6/Plugins/PluginCodeStyleChecker.py	Mon Jun 08 08:17:14 2020 +0200
+++ b/eric6/Plugins/PluginCodeStyleChecker.py	Mon Jun 08 20:08:27 2020 +0200
@@ -7,8 +7,8 @@
 Module implementing the code style checker plug-in.
 """
 
-
 import os
+import textwrap
 
 from PyQt5.QtCore import QObject, pyqtSignal, QCoreApplication
 
@@ -84,6 +84,8 @@
         
         self.queuedBatches = []
         self.batchesFinished = True
+        
+        self.__wrapper = textwrap.TextWrapper(width=80)
     
     def __serviceError(self, fn, msg):
         """
@@ -246,7 +248,7 @@
                 msg += "\n" + QCoreApplication.translate(
                     'CodeStyleCheckerDialog', "Fix: {0}").format(trFixedMsg)
             
-            result["display"] = msg
+            result["display"] = "\n".join(self.__wrapper.wrap(msg))
         self.styleChecked.emit(fn, codeStyleCheckerStats, fixes, results)
 
     def activate(self):

eric ide

mercurial