diff options
author | Jacob Walls <jacobtylerwalls@gmail.com> | 2022-07-31 11:45:00 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-31 11:45:00 -0400 |
commit | 5d5f5f7f9637926dcfd10eaeff69f04bb16da26e (patch) | |
tree | 44799e0efceb8eb2b60eecaa302a6fcbf80d0a1d /pylint/lint | |
parent | 9e17a6dbf0a43511ddaf5c36de83e3d09629437e (diff) | |
download | pylint-git-5d5f5f7f9637926dcfd10eaeff69f04bb16da26e.tar.gz |
Fix sys.path pollution in parallel mode (#7247)
Diffstat (limited to 'pylint/lint')
-rw-r--r-- | pylint/lint/pylinter.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pylint/lint/pylinter.py b/pylint/lint/pylinter.py index 53889ba29..bc227d2c4 100644 --- a/pylint/lint/pylinter.py +++ b/pylint/lint/pylinter.py @@ -651,12 +651,14 @@ class PyLinter( self.get_ast, self._iterate_file_descrs(files_or_modules) ) else: + original_sys_path = sys.path[:] check_parallel( self, self.config.jobs, self._iterate_file_descrs(files_or_modules), - files_or_modules, + files_or_modules, # this argument patches sys.path ) + sys.path = original_sys_path def check_single_file(self, name: str, filepath: str, modname: str) -> None: warnings.warn( |