Merge branch 'new-pylint'

This commit is contained in:
Florian Bruhin 2015-01-22 07:00:01 +01:00
commit 5a0a0302df
4 changed files with 13 additions and 4 deletions

View File

@ -2,6 +2,7 @@
[MASTER] [MASTER]
ignore=ez_setup.py ignore=ez_setup.py
extension-pkg-whitelist=PyQt5,sip
[MESSAGES CONTROL] [MESSAGES CONTROL]
disable=no-self-use, disable=no-self-use,
@ -23,7 +24,8 @@ disable=no-self-use,
too-many-instance-attributes, too-many-instance-attributes,
unnecessary-lambda, unnecessary-lambda,
blacklisted-name, blacklisted-name,
too-many-lines too-many-lines,
logging-format-interpolation
[BASIC] [BASIC]
module-rgx=(__)?[a-z][a-z0-9_]*(__)?$ module-rgx=(__)?[a-z][a-z0-9_]*(__)?$

View File

@ -13,7 +13,8 @@ exclude=test_.*
[pylint] [pylint]
args=--output-format=colorized,--reports=no,--rcfile=.pylintrc args=--output-format=colorized,--reports=no,--rcfile=.pylintrc
plugins=config,crlf,modeline,settrace,openencoding plugins=config,crlf,modeline,settrace,openencoding
exclude=resources.py # excluding command.py is a WORKAROUND for https://bitbucket.org/logilab/pylint/issue/395/horrible-performance-related-to-inspect
exclude=resources.py,command.py
[flake8] [flake8]
args=--config=.flake8 args=--config=.flake8

View File

@ -58,6 +58,9 @@ class ConfigParserTests(unittest.TestCase):
def test_transformed_option_old(self): def test_transformed_option_old(self):
"""Test a transformed option with the old name.""" """Test a transformed option with the old name."""
# WORKAROUND for unknown PyQt bug
# Instance of 'str' has no 'name' member
# pylint: disable=no-member
self.cp.read_dict({'colors': {'tab.fg.odd': 'pink'}}) self.cp.read_dict({'colors': {'tab.fg.odd': 'pink'}})
self.cfg._from_cp(self.cp) self.cfg._from_cp(self.cp)
self.assertEqual(self.cfg.get('colors', 'tabs.fg.odd').name(), self.assertEqual(self.cfg.get('colors', 'tabs.fg.odd').name(),
@ -65,6 +68,9 @@ class ConfigParserTests(unittest.TestCase):
def test_transformed_option_new(self): def test_transformed_option_new(self):
"""Test a transformed section with the new name.""" """Test a transformed section with the new name."""
# WORKAROUND for unknown PyQt bug
# Instance of 'str' has no 'name' member
# pylint: disable=no-member
self.cp.read_dict({'colors': {'tabs.fg.odd': 'pink'}}) self.cp.read_dict({'colors': {'tabs.fg.odd': 'pink'}})
self.cfg._from_cp(self.cp) self.cfg._from_cp(self.cp)
self.assertEqual(self.cfg.get('colors', 'tabs.fg.odd').name(), self.assertEqual(self.cfg.get('colors', 'tabs.fg.odd').name(),

View File

@ -70,8 +70,8 @@ def get_dev_packages(short=False):
Args: Args:
short: Remove the version specification. short: Remove the version specification.
""" """
packages = ['colorlog', 'flake8', 'astroid==1.2.1', 'pylint==1.3.1', packages = ['colorlog', 'flake8', 'astroid', 'pylint', 'pep257',
'pep257', 'colorama', 'beautifulsoup4'] 'colorama', 'beautifulsoup4']
if short: if short:
packages = [re.split(r'[<>=]', p)[0] for p in packages] packages = [re.split(r'[<>=]', p)[0] for p in packages]
return packages return packages