PluginPyLint.py

changeset 32
b0a6368042b9
parent 31
d8e6de5a0cb7
child 35
c3ca6d580760
equal deleted inserted replaced
31:d8e6de5a0cb7 32:b0a6368042b9
5 5
6 """ 6 """
7 Module implementing the PyLint plug-in. 7 Module implementing the PyLint plug-in.
8 """ 8 """
9 9
10 from __future__ import unicode_literals # __IGNORE_WARNING__ 10 from __future__ import unicode_literals
11 try: 11 try:
12 str = unicode # __IGNORE_WARNING__ 12 str = unicode
13 except (NameError): 13 except NameError:
14 pass 14 pass
15 15
16 import re 16 import re
17 import os 17 import os
18 import copy 18 import copy
40 # Start-of-Header 40 # Start-of-Header
41 name = "PyLint Plugin" 41 name = "PyLint Plugin"
42 author = "Detlev Offenbach <detlev@die-offenbachs.de>" 42 author = "Detlev Offenbach <detlev@die-offenbachs.de>"
43 autoactivate = True 43 autoactivate = True
44 deactivateable = True 44 deactivateable = True
45 version = "5.3.2" 45 version = "5.4.0"
46 className = "PyLintPlugin" 46 className = "PyLintPlugin"
47 packageName = "PyLint" 47 packageName = "PyLint"
48 shortDescription = "Show the PyLint dialogs." 48 shortDescription = "Show the PyLint dialogs."
49 longDescription = """This plug-in implements the PyLint dialogs.""" \ 49 longDescription = """This plug-in implements the PyLint dialogs.""" \
50 """ PyLint is used to check Python source files according to various""" \ 50 """ PyLint is used to check Python source files according to various""" \
51 """ rules.""" 51 """ rules."""
52 needsRestart = False 52 needsRestart = False
53 pyqtApi = 2 53 pyqtApi = 2
54 python2Compatible = True
54 # End-of-Header 55 # End-of-Header
55 56
56 exePy2 = [] 57 exePy2 = []
57 exePy3 = [] 58 exePy3 = []
58 59
490 491
491 enable = e5App().getObject("ProjectBrowser")\ 492 enable = e5App().getObject("ProjectBrowser")\
492 .getProjectBrowser("sources")\ 493 .getProjectBrowser("sources")\
493 .getSelectedItemsCount([ProjectBrowserFileItem]) == 1 494 .getSelectedItemsCount([ProjectBrowserFileItem]) == 1
494 self.__projectBrowserAct.setEnabled(enable) 495 self.__projectBrowserAct.setEnabled(enable)
495 self.__projectBrowserShowAct.setEnabled(enable and 496 self.__projectBrowserShowAct.setEnabled(
496 self.__pylintPsbDialog is not None) 497 enable and self.__pylintPsbDialog is not None)
497 498
498 def __pyLint(self, project, mpName, forProject, forEditor=False): 499 def __pyLint(self, project, mpName, forProject, forEditor=False):
499 """ 500 """
500 Private method used to perform a PyLint run. 501 Private method used to perform a PyLint run.
501 502

eric ide

mercurial