15 from PyQt4.QtGui import QDialog |
15 from PyQt4.QtGui import QDialog |
16 |
16 |
17 from E5Gui.E5Application import e5App |
17 from E5Gui.E5Application import e5App |
18 from E5Gui.E5Action import E5Action |
18 from E5Gui.E5Action import E5Action |
19 from E5Gui import E5MessageBox |
19 from E5Gui import E5MessageBox |
20 |
|
21 from PyLint.PyLintConfigDialog import PyLintConfigDialog |
|
22 from PyLint.PyLintExecDialog import PyLintExecDialog |
|
23 |
20 |
24 import Utilities |
21 import Utilities |
25 |
22 |
26 # Start-of-Header |
23 # Start-of-Header |
27 name = "PyLint Plugin" |
24 name = "PyLint Plugin" |
28 author = "Detlev Offenbach <detlev@die-offenbachs.de>" |
25 author = "Detlev Offenbach <detlev@die-offenbachs.de>" |
29 autoactivate = True |
26 autoactivate = True |
30 deactivateable = True |
27 deactivateable = True |
31 version = "5.1.2" |
28 version = "5.2.0" |
32 className = "PyLintPlugin" |
29 className = "PyLintPlugin" |
33 packageName = "PyLint" |
30 packageName = "PyLint" |
34 shortDescription = "Show the PyLint dialogs." |
31 shortDescription = "Show the PyLint dialogs." |
35 longDescription = """This plug-in implements the PyLint dialogs.""" \ |
32 longDescription = """This plug-in implements the PyLint dialogs.""" \ |
36 """ PyLint is used to check Python source files according to various rules.""" |
33 """ PyLint is used to check Python source files according to various rules.""" |
403 E5MessageBox.critical(None, |
400 E5MessageBox.critical(None, |
404 self.trUtf8("pylint"), |
401 self.trUtf8("pylint"), |
405 self.trUtf8("""The pylint executable could not be found.""")) |
402 self.trUtf8("""The pylint executable could not be found.""")) |
406 return |
403 return |
407 |
404 |
|
405 from PyLint.PyLintConfigDialog import PyLintConfigDialog |
408 dlg = PyLintConfigDialog(project.getProjectPath(), exe, parms) |
406 dlg = PyLintConfigDialog(project.getProjectPath(), exe, parms) |
409 if dlg.exec_() == QDialog.Accepted: |
407 if dlg.exec_() == QDialog.Accepted: |
410 args, parms = dlg.generateParameters() |
408 args, parms = dlg.generateParameters() |
411 self.__editorParms = copy.deepcopy(parms) |
409 self.__editorParms = copy.deepcopy(parms) |
412 if not forEditor: |
410 if not forEditor: |
413 project.setData('CHECKERSPARMS', "PYLINT", parms) |
411 project.setData('CHECKERSPARMS', "PYLINT", parms) |
414 |
412 |
415 # now do the call |
413 # now do the call |
|
414 from PyLint.PyLintExecDialog import PyLintExecDialog |
416 dlg2 = PyLintExecDialog() |
415 dlg2 = PyLintExecDialog() |
417 try: |
416 try: |
418 reportFile = parms['reportFile'] |
417 reportFile = parms['reportFile'] |
419 except KeyError: |
418 except KeyError: |
420 reportFile = None |
419 reportFile = None |