diff options
author | Claudiu Popa <pcmanticore@gmail.com> | 2015-10-26 10:45:19 +0000 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2015-10-26 10:45:19 +0000 |
commit | 4de9d2ce086b610ceadb5b37a0c7a09fa7270c8a (patch) | |
tree | bdb31b6b18481d5189c2295b9b9182e527c9c7a5 | |
parent | fc07aa766325535e0d206f24dbea44c36508408d (diff) | |
download | pylint-4de9d2ce086b610ceadb5b37a0c7a09fa7270c8a.tar.gz |
Cleanup _parallel_task by moving the creation of the config into its own function.
-rw-r--r-- | pylint/lint.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/pylint/lint.py b/pylint/lint.py index 4304c04..950722f 100644 --- a/pylint/lint.py +++ b/pylint/lint.py @@ -736,11 +736,10 @@ class PyLinter(config.OptionsManagerMixIn, with _patch_sysmodules(): self._parallel_check(files_or_modules) - def _parallel_task(self, files_or_modules): - # Prepare configuration for child linters. + def _get_jobs_config(self): + child_config = {} filter_options = {'symbols', 'include-ids', 'long-help'} filter_options.update([opt_name for opt_name, _ in self._external_opts]) - child_config = {} for opt_providers in six.itervalues(self._all_options): for optname, optdict, val in opt_providers.options_and_values(): if optdict.get('deprecated'): @@ -751,6 +750,11 @@ class PyLinter(config.OptionsManagerMixIn, optdict, val) child_config['python3_porting_mode'] = self._python3_porting_mode child_config['plugins'] = self._dynamic_plugins + return child_config + + def _parallel_task(self, files_or_modules): + # Prepare configuration for child linters. + child_config = self._get_jobs_config() children = [] manager = multiprocessing.Manager() |