forked from VimPlug/jedi
enable None file_paths for related_name
This commit is contained in:
+7
-6
@@ -47,7 +47,7 @@ def get_directory_modules_for_name(mods, name):
|
|||||||
return modules.Module(path, source).parser.module
|
return modules.Module(path, source).parser.module
|
||||||
|
|
||||||
# skip non python modules
|
# skip non python modules
|
||||||
mods = set(m for m in mods if m.path.endswith('.py'))
|
mods = set(m for m in mods if m.path is None or m.path.endswith('.py'))
|
||||||
mod_paths = set()
|
mod_paths = set()
|
||||||
for m in mods:
|
for m in mods:
|
||||||
mod_paths.add(m.path)
|
mod_paths.add(m.path)
|
||||||
@@ -56,11 +56,12 @@ def get_directory_modules_for_name(mods, name):
|
|||||||
if settings.dynamic_params_for_other_modules:
|
if settings.dynamic_params_for_other_modules:
|
||||||
paths = set(settings.additional_dynamic_modules)
|
paths = set(settings.additional_dynamic_modules)
|
||||||
for p in mod_paths:
|
for p in mod_paths:
|
||||||
d = os.path.dirname(p)
|
if p is not None:
|
||||||
for entry in os.listdir(d):
|
d = os.path.dirname(p)
|
||||||
if entry not in mod_paths:
|
for entry in os.listdir(d):
|
||||||
if entry.endswith('.py'):
|
if entry not in mod_paths:
|
||||||
paths.add(d + os.path.sep + entry)
|
if entry.endswith('.py'):
|
||||||
|
paths.add(d + os.path.sep + entry)
|
||||||
|
|
||||||
for p in paths:
|
for p in paths:
|
||||||
c = check_python_file(p)
|
c = check_python_file(p)
|
||||||
|
|||||||
Reference in New Issue
Block a user