mirror of
https://github.com/davidhalter/jedi.git
synced 2026-05-19 23:09:43 +08:00
Fix a potential issue with the loading of settings.
This commit is contained in:
@@ -507,7 +507,9 @@ def get_modules_containing_name(evaluator, mods, name):
|
|||||||
paths = set(settings.additional_dynamic_modules)
|
paths = set(settings.additional_dynamic_modules)
|
||||||
for p in mod_paths:
|
for p in mod_paths:
|
||||||
if p is not None:
|
if p is not None:
|
||||||
d = os.path.dirname(p)
|
# We need abspath, because the seetings paths might not already
|
||||||
|
# have been converted to absolute paths.
|
||||||
|
d = os.path.dirname(os.path.abspath(p))
|
||||||
for entry in os.listdir(d):
|
for entry in os.listdir(d):
|
||||||
if entry not in mod_paths:
|
if entry not in mod_paths:
|
||||||
if entry.endswith('.py'):
|
if entry.endswith('.py'):
|
||||||
|
|||||||
Reference in New Issue
Block a user