From a0bf465aee4e6fc762c00fcce9ae917035a3bd3c Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Thu, 7 Sep 2017 01:10:54 +0200 Subject: [PATCH] Fix an issue in stdlib path checking. --- jedi/evaluate/helpers.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jedi/evaluate/helpers.py b/jedi/evaluate/helpers.py index 05b934d9..b2de3676 100644 --- a/jedi/evaluate/helpers.py +++ b/jedi/evaluate/helpers.py @@ -13,6 +13,9 @@ def is_stdlib_path(path): # Python standard library paths look like this: # /usr/lib/python3.5/... # TODO The implementation below is probably incorrect and not complete. + if 'dist-packages' in path or 'site-packages' in path: + return False + base_path = os.path.join(sys.prefix, 'lib', 'python') return bool(re.match(re.escape(base_path) + '\d.\d', path))