eric6/Plugins/PluginCodeStyleChecker.py

changeset 7613
382f89c11e27
parent 7610
df7025fe26a3
child 7635
0cdead130a81
equal deleted inserted replaced
7612:ca1ce1e0fcff 7613:382f89c11e27
5 5
6 """ 6 """
7 Module implementing the code style checker plug-in. 7 Module implementing the code style checker plug-in.
8 """ 8 """
9 9
10
11 import os 10 import os
11 import textwrap
12 12
13 from PyQt5.QtCore import QObject, pyqtSignal, QCoreApplication 13 from PyQt5.QtCore import QObject, pyqtSignal, QCoreApplication
14 14
15 from E5Gui.E5Application import e5App 15 from E5Gui.E5Application import e5App
16 from E5Gui.E5Action import E5Action 16 from E5Gui.E5Action import E5Action
82 onErrorCallback=self.serviceErrorPy3, 82 onErrorCallback=self.serviceErrorPy3,
83 onBatchDone=self.batchJobDone) 83 onBatchDone=self.batchJobDone)
84 84
85 self.queuedBatches = [] 85 self.queuedBatches = []
86 self.batchesFinished = True 86 self.batchesFinished = True
87
88 self.__wrapper = textwrap.TextWrapper(width=80)
87 89
88 def __serviceError(self, fn, msg): 90 def __serviceError(self, fn, msg):
89 """ 91 """
90 Private slot handling service errors. 92 Private slot handling service errors.
91 93
244 result["fixargs"]) 246 result["fixargs"])
245 247
246 msg += "\n" + QCoreApplication.translate( 248 msg += "\n" + QCoreApplication.translate(
247 'CodeStyleCheckerDialog', "Fix: {0}").format(trFixedMsg) 249 'CodeStyleCheckerDialog', "Fix: {0}").format(trFixedMsg)
248 250
249 result["display"] = msg 251 result["display"] = "\n".join(self.__wrapper.wrap(msg))
250 self.styleChecked.emit(fn, codeStyleCheckerStats, fixes, results) 252 self.styleChecked.emit(fn, codeStyleCheckerStats, fixes, results)
251 253
252 def activate(self): 254 def activate(self):
253 """ 255 """
254 Public method to activate this plugin. 256 Public method to activate this plugin.

eric ide

mercurial