mirror of
https://github.com/davidhalter/jedi.git
synced 2026-03-01 11:46:51 +08:00
Merge branch 'dev' of https://github.com/bstaint/jedi into dev
This commit is contained in:
@@ -340,7 +340,13 @@ def dotted_from_fs_path(fs_path, sys_path):
|
||||
for s in sys_path:
|
||||
if (fs_path.startswith(s) and len(path) < len(s)):
|
||||
path = s
|
||||
return _path_re.sub('', fs_path[len(path):].lstrip(os.path.sep)).replace(os.path.sep, '.')
|
||||
|
||||
# - Window
|
||||
# X:\path\to\lib-dynload/datetime.pyd => datetime
|
||||
module_path = fs_path[len(path):].lstrip(os.path.sep).lstrip('/')
|
||||
# - Window
|
||||
# Replace like X:\path\to\something/foo/bar.py
|
||||
return _path_re.sub('', module_path).replace(os.path.sep, '.').replace('/', '.')
|
||||
|
||||
|
||||
def load_module(evaluator, path=None, name=None):
|
||||
|
||||
Reference in New Issue
Block a user