From 2e45c2c0631513722eea5c9a7a44be52982381b3 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 20 Jan 2015 00:02:35 +0100 Subject: [PATCH 1/3] Stop pinning pylint/astroid to 1.3.1/1.2.1. --- .pylintrc | 4 +++- scripts/init_venv.py | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.pylintrc b/.pylintrc index 8cb7a35fd..8498bea12 100644 --- a/.pylintrc +++ b/.pylintrc @@ -2,6 +2,7 @@ [MASTER] ignore=ez_setup.py +extension-pkg-whitelist=PyQt5,sip [MESSAGES CONTROL] disable=no-self-use, @@ -23,7 +24,8 @@ disable=no-self-use, too-many-instance-attributes, unnecessary-lambda, blacklisted-name, - too-many-lines + too-many-lines, + logging-format-interpolation [BASIC] module-rgx=(__)?[a-z][a-z0-9_]*(__)?$ diff --git a/scripts/init_venv.py b/scripts/init_venv.py index 1b89652f9..49e548933 100644 --- a/scripts/init_venv.py +++ b/scripts/init_venv.py @@ -70,8 +70,8 @@ def get_dev_packages(short=False): Args: short: Remove the version specification. """ - packages = ['colorlog', 'flake8', 'astroid==1.2.1', 'pylint==1.3.1', - 'pep257', 'colorama', 'beautifulsoup4'] + packages = ['colorlog', 'flake8', 'astroid', 'pylint', 'pep257', + 'colorama', 'beautifulsoup4'] if short: packages = [re.split(r'[<>=]', p)[0] for p in packages] return packages From 958e67ab9ea753a40569d537059abd42df8fdb7d Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 20 Jan 2015 00:03:13 +0100 Subject: [PATCH 2/3] Add workaround for pylint performance bug. See https://bitbucket.org/logilab/pylint/issue/395/horrible-performance-related-to-inspect --- .run_checks | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.run_checks b/.run_checks index 070f920f1..808d5882f 100644 --- a/.run_checks +++ b/.run_checks @@ -13,7 +13,8 @@ exclude=test_.* [pylint] args=--output-format=colorized,--reports=no,--rcfile=.pylintrc 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] args=--config=.flake8 From 6d3f871119a3907cad93537425a986cf4d105cf6 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 20 Jan 2015 00:04:59 +0100 Subject: [PATCH 3/3] Add workaround for unknown pylint no-member bug. --- qutebrowser/test/config/test_config.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/qutebrowser/test/config/test_config.py b/qutebrowser/test/config/test_config.py index 7555df655..e27c49063 100644 --- a/qutebrowser/test/config/test_config.py +++ b/qutebrowser/test/config/test_config.py @@ -58,6 +58,9 @@ class ConfigParserTests(unittest.TestCase): def test_transformed_option_old(self): """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.cfg._from_cp(self.cp) self.assertEqual(self.cfg.get('colors', 'tabs.fg.odd').name(), @@ -65,6 +68,9 @@ class ConfigParserTests(unittest.TestCase): def test_transformed_option_new(self): """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.cfg._from_cp(self.cp) self.assertEqual(self.cfg.get('colors', 'tabs.fg.odd').name(),