summaryrefslogtreecommitdiff
path: root/pylint/__main__.py
diff options
context:
space:
mode:
authorMarc Mueller <30130371+cdce8p@users.noreply.github.com>2021-03-01 12:49:45 +0100
committerPierre Sassoulas <pierre.sassoulas@gmail.com>2021-03-05 19:08:42 +0100
commit56b8e229d9150d57e090a1e4bd046b2fe8541d97 (patch)
tree822bcba13ce360023b18dbb234b37088ae77a850 /pylint/__main__.py
parentb8c9472706de23e79d540a4df717cf2966483891 (diff)
downloadpylint-git-56b8e229d9150d57e090a1e4bd046b2fe8541d97.tar.gz
Refactor modify sys_path for execution as python module
Diffstat (limited to 'pylint/__main__.py')
-rw-r--r--pylint/__main__.py11
1 files changed, 1 insertions, 10 deletions
diff --git a/pylint/__main__.py b/pylint/__main__.py
index 89bd19924..4d7653718 100644
--- a/pylint/__main__.py
+++ b/pylint/__main__.py
@@ -3,16 +3,7 @@
# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
# For details: https://github.com/PyCQA/pylint/blob/master/COPYING
-import os
-import sys
-
import pylint
-# Strip out the current working directory from sys.path.
-# Having the working directory in `sys.path` means that `pylint` might
-# inadvertently import user code from modules having the same name as
-# stdlib or pylint's own modules.
-# CPython issue: https://bugs.python.org/issue33053
-sys.path = [p for p in sys.path if p not in ("", os.getcwd())]
-
+pylint.modify_sys_path()
pylint.run_pylint()