mirror of
https://github.com/davidhalter/jedi.git
synced 2026-01-16 08:56:44 +08:00
Replace multiple slashes.
This commit is contained in:
@@ -343,7 +343,9 @@ def dotted_from_fs_path(fs_path, sys_path):
|
||||
# - Window
|
||||
# X:\path\to\lib-dynload/datetime.pyd => datetime
|
||||
module_path = fs_path[len(path):].lstrip(os.path.sep).lstrip('/')
|
||||
return _path_re.sub('', module_path).replace(os.path.sep, '.')
|
||||
# - 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