Skip to content

Commit

Permalink
Make sure to stop gathering buildout paths at a certain point, fixes #…
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhalter committed Jan 22, 2020
1 parent 6a75a0c commit 0c56aa4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions jedi/inference/sys_path.py
Expand Up @@ -10,6 +10,8 @@
from jedi import settings
from jedi import debug

_BUILDOUT_PATH_INSERTION_LIMIT = 10


def _abs_path(module_context, path):
if os.path.isabs(path):
Expand Down Expand Up @@ -138,6 +140,8 @@ def discover_buildout_paths(inference_state, 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):
buildout_script_paths.add(path)
if len(buildout_script_paths) >= _BUILDOUT_PATH_INSERTION_LIMIT:
break

return buildout_script_paths

Expand Down

0 comments on commit 0c56aa4

Please sign in to comment.