1
0
forked from VimPlug/jedi

move source_to_unicode to common

This commit is contained in:
Dave Halter
2014-01-05 13:17:04 +01:00
parent 9523e70a71
commit fce36ebea4
5 changed files with 46 additions and 38 deletions

View File

@@ -87,7 +87,7 @@ class Script(object):
api_classes.clear_caches()
debug.reset_time()
self.source = modules.source_to_unicode(source, encoding)
self.source = common.source_to_unicode(source, encoding)
self._module = modules.ModuleWithCursor(
path, source=self.source, position=self._pos)
self._evaluator = Evaluator()
@@ -671,7 +671,7 @@ def defined_names(source, path=None, encoding='utf-8'):
:rtype: list of api_classes.Definition
"""
parser = Parser(
modules.source_to_unicode(source, encoding),
common.source_to_unicode(source, encoding),
module_path=path,
)
return api_classes._defined_names(Evaluator(), parser.module)