Plugins/CheckerPlugins/Pep8/Pep8Checker.py

changeset 1180
566742748d48
parent 945
8cd4d08fa9f6
child 1339
913182fdc3dd
equal deleted inserted replaced
1179:7661ab683f7b 1180:566742748d48
8 """ 8 """
9 9
10 import os 10 import os
11 import optparse 11 import optparse
12 12
13 from PyQt4.QtCore import QProcess 13 from PyQt4.QtCore import QProcess, QCoreApplication
14 14
15 from . import pep8 15 from . import pep8
16 16
17 import Preferences 17 import Preferences
18 import Utilities 18 import Utilities
137 self.statistics = {} 137 self.statistics = {}
138 138
139 interpreter = Preferences.getDebugger("PythonInterpreter") 139 interpreter = Preferences.getDebugger("PythonInterpreter")
140 if interpreter == "" or not Utilities.isExecutable(interpreter): 140 if interpreter == "" or not Utilities.isExecutable(interpreter):
141 self.messages.append(filename, "1", "1", 141 self.messages.append(filename, "1", "1",
142 self.trUtf8("Python2 interpreter not configured.")) 142 QCoreApplication.translate("Pep8Py2Checker",
143 "Python2 interpreter not configured."))
143 return 144 return
144 145
145 checker = os.path.join(getConfig('ericDir'), 146 checker = os.path.join(getConfig('ericDir'),
146 "UtilitiesPython2", "Pep8Checker.py") 147 "UtilitiesPython2", "Pep8Checker.py")
147 148
197 code, countStr = output[index].split(None, 1) 198 code, countStr = output[index].split(None, 1)
198 self.statistics[code] = int(countStr) 199 self.statistics[code] = int(countStr)
199 index += 1 200 index += 1
200 else: 201 else:
201 self.messages.append(filename, "1", "1", 202 self.messages.append(filename, "1", "1",
202 self.trUtf8("Python2 interpreter did not finish within 15s.")) 203 QCoreApplication.translate("Pep8Py2Checker",
204 "Python2 interpreter did not finish within 15s."))

eric ide

mercurial