1
0
forked from VimPlug/jedi

Small sys path refactoring.

This commit is contained in:
Dave Halter
2017-10-06 09:01:15 +02:00
parent 21531abd1e
commit 8dba08eeb2
3 changed files with 10 additions and 10 deletions

View File

@@ -5,7 +5,7 @@ import imp
from jedi.evaluate.site import addsitedir
from jedi._compatibility import unicode
from jedi.evaluate.cache import evaluator_function_cache
from jedi.evaluate.cache import evaluator_method_cache
from jedi.evaluate.base_context import ContextualizedNode
from jedi.evaluate.helpers import is_string
from jedi import settings
@@ -150,6 +150,7 @@ def _paths_from_list_modifications(module_context, trailer1, trailer2):
yield abs_path
@evaluator_method_cache(default=[])
def check_sys_path_modifications(module_context):
"""
Detect sys.path modifications within module.
@@ -187,7 +188,6 @@ def check_sys_path_modifications(module_context):
return added
@evaluator_function_cache(default=[])
def sys_path_with_modifications(evaluator, module_context):
return evaluator.project.sys_path + check_sys_path_modifications(module_context)