mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 14:04:26 +08:00
Make sure to stop gathering buildout paths at a certain point, fixes #1325
This commit is contained in:
@@ -10,6 +10,8 @@ from jedi.file_io import FileIO
|
|||||||
from jedi import settings
|
from jedi import settings
|
||||||
from jedi import debug
|
from jedi import debug
|
||||||
|
|
||||||
|
_BUILDOUT_PATH_INSERTION_LIMIT = 10
|
||||||
|
|
||||||
|
|
||||||
def _abs_path(module_context, path):
|
def _abs_path(module_context, path):
|
||||||
if os.path.isabs(path):
|
if os.path.isabs(path):
|
||||||
@@ -138,6 +140,8 @@ def discover_buildout_paths(inference_state, script_path):
|
|||||||
for buildout_script_path in _get_buildout_script_paths(script_path):
|
for buildout_script_path in _get_buildout_script_paths(script_path):
|
||||||
for path in _get_paths_from_buildout_script(inference_state, buildout_script_path):
|
for path in _get_paths_from_buildout_script(inference_state, buildout_script_path):
|
||||||
buildout_script_paths.add(path)
|
buildout_script_paths.add(path)
|
||||||
|
if len(buildout_script_paths) >= _BUILDOUT_PATH_INSERTION_LIMIT:
|
||||||
|
break
|
||||||
|
|
||||||
return buildout_script_paths
|
return buildout_script_paths
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user