Plugins/PluginPep8Checker.py

changeset 2973
284c7f4bc875
parent 2916
a8628dfdfe04
child 2980
2cb4e3c50b37
equal deleted inserted replaced
2972:ae58d4b2562e 2973:284c7f4bc875
195 for file in project.pdata["SOURCES"] 195 for file in project.pdata["SOURCES"]
196 if file.endswith( 196 if file.endswith(
197 tuple(Preferences.getPython("Python3Extensions")) + 197 tuple(Preferences.getPython("Python3Extensions")) +
198 tuple(Preferences.getPython("PythonExtensions")))] 198 tuple(Preferences.getPython("PythonExtensions")))]
199 199
200 from CheckerPlugins.Pep8.Pep8Dialog import Pep8Dialog 200 from CheckerPlugins.Pep8.CodeStyleCheckerDialog import \
201 self.__projectPep8CheckerDialog = Pep8Dialog() 201 CodeStyleCheckerDialog
202 self.__projectPep8CheckerDialog = CodeStyleCheckerDialog()
202 self.__projectPep8CheckerDialog.show() 203 self.__projectPep8CheckerDialog.show()
203 self.__projectPep8CheckerDialog.prepare(files, project) 204 self.__projectPep8CheckerDialog.prepare(files, project)
204 205
205 def __projectBrowserPep8Check(self): 206 def __projectBrowserPep8Check(self):
206 """ 207 """
215 isDir = False 216 isDir = False
216 except AttributeError: 217 except AttributeError:
217 fn = itm.dirName() 218 fn = itm.dirName()
218 isDir = True 219 isDir = True
219 220
220 from CheckerPlugins.Pep8.Pep8Dialog import Pep8Dialog 221 from CheckerPlugins.Pep8.CodeStyleCheckerDialog import \
221 self.__projectBrowserPep8CheckerDialog = Pep8Dialog() 222 CodeStyleCheckerDialog
223 self.__projectBrowserPep8CheckerDialog = CodeStyleCheckerDialog()
222 self.__projectBrowserPep8CheckerDialog.show() 224 self.__projectBrowserPep8CheckerDialog.show()
223 if isDir: 225 if isDir:
224 self.__projectBrowserPep8CheckerDialog.start( 226 self.__projectBrowserPep8CheckerDialog.start(
225 fn, save=True) 227 fn, save=True)
226 else: 228 else:
271 of the editors. 273 of the editors.
272 """ 274 """
273 editor = e5App().getObject("ViewManager").activeWindow() 275 editor = e5App().getObject("ViewManager").activeWindow()
274 if editor is not None: 276 if editor is not None:
275 if editor.checkDirty() and editor.getFileName() is not None: 277 if editor.checkDirty() and editor.getFileName() is not None:
276 from CheckerPlugins.Pep8.Pep8Dialog import Pep8Dialog 278 from CheckerPlugins.Pep8.CodeStyleCheckerDialog import \
277 self.__editorPep8CheckerDialog = Pep8Dialog() 279 CodeStyleCheckerDialog
280 self.__editorPep8CheckerDialog = CodeStyleCheckerDialog()
278 self.__editorPep8CheckerDialog.show() 281 self.__editorPep8CheckerDialog.show()
279 self.__editorPep8CheckerDialog.start( 282 self.__editorPep8CheckerDialog.start(
280 editor.getFileName(), 283 editor.getFileName(),
281 save=True, 284 save=True,
282 repeat=True) 285 repeat=True)

eric ide

mercurial