1
0
forked from VimPlug/jedi

Fix an issue in stdlib path checking.

This commit is contained in:
Dave Halter
2017-09-07 01:10:54 +02:00
parent d2b4e0511f
commit a0bf465aee

View File

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