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))