1
0
forked from VimPlug/jedi

Remove old commented code.

This commit is contained in:
Dave Halter
2015-03-06 11:22:38 +01:00
parent eb146adcc1
commit 8b1c033fc4

View File

@@ -333,29 +333,6 @@ def dotted_from_fs_path(fs_path, sys_path=None):
def load_module(path, name): def load_module(path, name):
"""
if not name:
name = os.path.basename(path)
name = name.rpartition('.')[0] # cut file type (normally .so)
# sometimes there are endings like `_sqlite3.cpython-32mu`
name = re.sub(r'\..*', '', name)
dot_path = []
if path:
p = path
# if path is not in sys.path, we need to make a well defined import
# like `from numpy.core import umath.`
while p and p not in sys.path:
p, sep, mod = p.rpartition(os.path.sep)
dot_path.insert(0, mod.partition('.')[0])
if p:
name = ".".join(dot_path)
path = p
else:
path = os.path.dirname(path)
"""
if path is not None: if path is not None:
dotted_path = dotted_from_fs_path(path) dotted_path = dotted_from_fs_path(path)
else: else: