mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 14:04:26 +08:00
The given sys_path gets converted to unicode now in py2
This commit is contained in:
@@ -15,6 +15,7 @@ import sys
|
||||
from parso.python import tree
|
||||
from parso import python_bytes_to_unicode, split_lines
|
||||
|
||||
from jedi._compatibility import force_unicode, is_py3
|
||||
from jedi.parser_utils import get_executable_nodes
|
||||
from jedi import debug
|
||||
from jedi import settings
|
||||
@@ -111,6 +112,9 @@ class Script(object):
|
||||
cache.clear_time_caches()
|
||||
debug.reset_time()
|
||||
|
||||
if sys_path is not None and not is_py3:
|
||||
sys_path = list(map(force_unicode, sys_path))
|
||||
|
||||
# Load the Python grammar of the current interpreter.
|
||||
project = Project(sys_path=sys_path)
|
||||
self._evaluator = Evaluator(project, environment)
|
||||
|
||||
Reference in New Issue
Block a user