mirror of
https://github.com/davidhalter/jedi.git
synced 2026-05-18 14:29:40 +08:00
added a new option: dynamic_params_for_other_modules
This commit is contained in:
+12
-11
@@ -48,18 +48,19 @@ def get_directory_modules_for_name(mods, name):
|
|||||||
mod_paths.add(m.path)
|
mod_paths.add(m.path)
|
||||||
yield m
|
yield m
|
||||||
|
|
||||||
paths = set(settings.additional_dynamic_modules)
|
if settings.dynamic_params_for_other_modules:
|
||||||
for p in mod_paths:
|
paths = set(settings.additional_dynamic_modules)
|
||||||
d = os.path.dirname(p)
|
for p in mod_paths:
|
||||||
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)
|
||||||
if c is not None and c not in mods:
|
if c is not None and c not in mods:
|
||||||
yield c
|
yield c
|
||||||
|
|
||||||
|
|
||||||
def search_param_memoize(func):
|
def search_param_memoize(func):
|
||||||
|
|||||||
@@ -27,6 +27,8 @@ dynamic_array_additions = True
|
|||||||
# A dynamic param completion, finds the callees of the function, which define
|
# A dynamic param completion, finds the callees of the function, which define
|
||||||
# the params of a function.
|
# the params of a function.
|
||||||
dynamic_params = True
|
dynamic_params = True
|
||||||
|
# Do the same for other modules.
|
||||||
|
dynamic_params_for_other_modules = True
|
||||||
|
|
||||||
# Additional modules in which Jedi checks if statements are to be found. This
|
# Additional modules in which Jedi checks if statements are to be found. This
|
||||||
# is practical for IDE's, that want to administrate their modules themselves.
|
# is practical for IDE's, that want to administrate their modules themselves.
|
||||||
|
|||||||
Reference in New Issue
Block a user