Skip to content

Commit

Permalink
remove entire _patch_submodules
Browse files Browse the repository at this point in the history
  • Loading branch information
dickreuter authored and PCManticore committed Jan 20, 2019
1 parent 8a3560a commit 090691c
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions pylint/lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,20 +135,6 @@ def _merge_stats(stats):
return merged


@contextlib.contextmanager
def _patch_sysmodules():
# Context manager that permits running pylint, on Windows, with -m switch
# and with --jobs, as in 'python -2 -m pylint .. --jobs'.
# For more details why this is needed,
# see Python issue http://bugs.python.org/issue10845.

mock_main = __name__ != "__main__" # -m switch
if mock_main:
sys.modules["__main__"] = sys.modules[__name__]

yield


# Python Linter class #########################################################

MSGS = {
Expand Down Expand Up @@ -949,8 +935,7 @@ def check(self, files_or_modules):
if self.config.jobs == 1:
self._do_check(files_or_modules)
else:
with _patch_sysmodules():
self._parallel_check(files_or_modules)
self._parallel_check(files_or_modules)

def _get_jobs_config(self):
child_config = collections.OrderedDict()
Expand Down

0 comments on commit 090691c

Please sign in to comment.