--- a/PyLint/PyLintConfigDialog.py Sun Apr 14 14:46:14 2013 +0200 +++ b/PyLint/PyLintConfigDialog.py Thu Sep 26 22:53:14 2013 +0200 @@ -7,6 +7,12 @@ Module implementing a dialog to configure the PyLint process """ +from __future__ import unicode_literals # __IGNORE_WARNING__ +try: + str = unicode +except (NameError): + pass + import os import copy @@ -27,7 +33,7 @@ """ Class implementing a dialog to configure the PyLint process """ - def __init__(self, ppath, exe, parms=None, parent=None): + def __init__(self, ppath, exe, parms, version): """ Constructor @@ -35,11 +41,12 @@ Used to set the default path for the rcfile selection dialog @param exe name of the pylint executable (string) @param parms parameters to set in the dialog - @param parent reference to the parent widget (QWidget) + @param version pylint version (string) """ - super().__init__(parent) + super(PyLintConfigDialog, self).__init__(None) self.setupUi(self) + self.version = version self.pylintProc = None self.lint = exe @@ -101,20 +108,20 @@ 'dialogReport': False, # enabled checkers - 'enableBasic': False, - 'enableClasses': False, - 'enableDesign': False, - 'enableExceptions': False, + 'enableBasic': True, + 'enableClasses': True, + 'enableDesign': True, + 'enableExceptions': True, 'enableFormat': False, 'enableImports': False, + 'enableLogging': True, 'enableMetrics': True, - 'enableMiscellaneous': False, - 'enableNewstyle': False, - 'enableSimilarities': False, - 'enableTypecheck': False, - 'enableVariables': False, - 'enableLogging': False, - 'enableStringFormat': False, + 'enableMiscellaneous': True, + 'enableNewstyle': True, + 'enableSimilarities': True, + 'enableStringFormat': True, + 'enableTypecheck': True, + 'enableVariables': True, # messages 'enabledMessages': '', @@ -205,7 +212,12 @@ if self.parameters['enableLogging']: checkers.append('logging') if self.parameters['enableStringFormat']: - checkers.append('string_format') + if self.version > '0.27.0': + checkers.append('string') + else: + checkers.append('string_format') + + args.append('--disable=all') if checkers: args.append('--enable={0}'.format(','.join(checkers))) @@ -291,7 +303,7 @@ [m.strip() for m in self.disabledMessagesEdit.text().split(',')]) # call the accept slot of the base class - super().accept() + super(PyLintConfigDialog, self).accept() ############################################################################ ## Methods below are needed to generate a configuration file template