1
0
forked from VimPlug/jedi

Force unicode on django paths

This commit is contained in:
Dave Halter
2018-01-30 00:40:50 +01:00
parent 60f89522a7
commit 91d3c1f6d3

View File

@@ -16,6 +16,10 @@ _CONTAINS_POTENTIAL_PROJECT = 'setup.py', '.git', '.hg', 'MANIFEST.in'
_SERIALIZER_VERSION = 1 _SERIALIZER_VERSION = 1
def _force_unicode_list(lst):
return list(map(force_unicode, lst))
class Project(object): class Project(object):
_serializer_ignore_attributes = ('_environment',) _serializer_ignore_attributes = ('_environment',)
_environment = None _environment = None
@@ -97,11 +101,8 @@ class Project(object):
if self._smart_sys_path: if self._smart_sys_path:
if self._django: if self._django:
prefixed.append(self._path) prefixed.append(self._path)
added_paths = map( added_paths = detect_additional_paths(evaluator, evaluator.script_path)
force_unicode, return _force_unicode_list(prefixed) + sys_path + _force_unicode_list(added_paths)
detect_additional_paths(evaluator, evaluator.script_path)
)
return prefixed + sys_path + list(added_paths)
def save(self): def save(self):
data = dict(self.__dict__) data = dict(self.__dict__)