From 0cf4153a638be20dff421bc9b890ffa30aeb40d3 Mon Sep 17 00:00:00 2001 From: Claudiu Popa Date: Tue, 24 Mar 2015 12:05:24 +0200 Subject: [PATCH] --jobs can be used with --load-plugins now. Closes issue #456. --- ChangeLog | 2 ++ pylint/lint.py | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index bb7d2cdd9b..6370d53dc2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -25,6 +25,8 @@ ChangeLog for Pylint as in `# pylint: disable=old-style-class;reason=...`. Closes issue #449. + * --jobs can be used with --load-plugins now. Closes issue #456. + 2015-03-14 -- 1.4.3 diff --git a/pylint/lint.py b/pylint/lint.py index 4dfb87c8f6..c03c55571a 100644 --- a/pylint/lint.py +++ b/pylint/lint.py @@ -214,6 +214,7 @@ def run(self): self._config["jobs"] = 1 # Child does not parallelize any further. self._python3_porting_mode = self._config.pop( 'python3_porting_mode', None) + self._plugins = self._config.pop('plugins', None) # Run linter for received files/modules. for file_or_module in iter(tasks_queue.get, 'STOP'): @@ -232,7 +233,8 @@ def _run_linter(self, file_or_module): # Register standard checkers. linter.load_default_plugins() # Load command line plugins. - # TODO linter.load_plugin_modules(self._plugins) + if self._plugins: + linter.load_plugin_modules(self._plugins) linter.load_configuration(**self._config) linter.set_reporter(reporters.CollectingReporter()) @@ -760,6 +762,7 @@ def _parallel_task(self, files_or_modules): if optname not in filter_options: config[optname] = configuration.format_option_value(optdict, val) config['python3_porting_mode'] = self._python3_porting_mode + config['plugins'] = self._dynamic_plugins childs = [] manager = multiprocessing.Manager() # pylint: disable=no-member