forked from VimPlug/jedi
Add a test to avoid encoding issues. Fixes #1003
This commit is contained in:
@@ -104,7 +104,7 @@ class Evaluator(object):
|
||||
project.add_evaluator(self)
|
||||
|
||||
self.reset_recursion_limitations()
|
||||
self.allow_different_encoding = False
|
||||
self.allow_different_encoding = True
|
||||
|
||||
# Constants
|
||||
self.BUILTINS = compiled.get_special_object(self, 'BUILTINS')
|
||||
|
||||
@@ -369,8 +369,9 @@ class Importer(object):
|
||||
else:
|
||||
module_path = get_init_path(module_path)
|
||||
elif module_file:
|
||||
code = module_file.read()
|
||||
module_file.close()
|
||||
with open(module_path, 'rb') as f:
|
||||
code = f.read()
|
||||
|
||||
if isinstance(module_path, ImplicitNSInfo):
|
||||
from jedi.evaluate.context.namespace import ImplicitNamespaceContext
|
||||
|
||||
Reference in New Issue
Block a user