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/.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 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(), 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