diff --git a/jedi/evaluate/__init__.py b/jedi/evaluate/__init__.py index 1a9ad571..2c535d98 100644 --- a/jedi/evaluate/__init__.py +++ b/jedi/evaluate/__init__.py @@ -111,7 +111,7 @@ class Evaluator(object): @property @evaluator_function_cache() def builtins_module(self): - return compiled.get_special_object(self, 'BUILTINS') + return compiled.get_special_object(self, u'BUILTINS') def reset_recursion_limitations(self): self.recursion_detector = recursion.RecursionDetector() diff --git a/jedi/evaluate/context/function.py b/jedi/evaluate/context/function.py index 8fb8389b..e06676de 100644 --- a/jedi/evaluate/context/function.py +++ b/jedi/evaluate/context/function.py @@ -83,9 +83,9 @@ class FunctionContext(use_metaclass(CachedMetaClass, TreeContext)): # This differentiation is only necessary for Python2. Python3 does not # use a different method class. if isinstance(parser_utils.get_parent_scope(self.tree_node), tree.Class): - name = 'METHOD_CLASS' + name = u'METHOD_CLASS' else: - name = 'FUNCTION_CLASS' + name = u'FUNCTION_CLASS' return compiled.get_special_object(self.evaluator, name) @property diff --git a/jedi/evaluate/context/iterable.py b/jedi/evaluate/context/iterable.py index 7585852b..0255234f 100644 --- a/jedi/evaluate/context/iterable.py +++ b/jedi/evaluate/context/iterable.py @@ -67,7 +67,7 @@ class GeneratorMixin(object): return ContextSet.from_sets(lazy_context.infer() for lazy_context in self.py__iter__()) def get_filters(self, search_global, until_position=None, origin_scope=None): - gen_obj = compiled.get_special_object(self.evaluator, 'GENERATOR_OBJECT') + gen_obj = compiled.get_special_object(self.evaluator, u'GENERATOR_OBJECT') yield SpecialMethodFilter(self, self.builtin_methods, gen_obj) for filter in gen_obj.get_filters(search_global): yield filter @@ -76,7 +76,7 @@ class GeneratorMixin(object): return True def py__class__(self): - gen_obj = compiled.get_special_object(self.evaluator, 'GENERATOR_OBJECT') + gen_obj = compiled.get_special_object(self.evaluator, u'GENERATOR_OBJECT') return gen_obj.py__class__() @property diff --git a/jedi/evaluate/context/module.py b/jedi/evaluate/context/module.py index 9833207a..8b88c4ff 100644 --- a/jedi/evaluate/context/module.py +++ b/jedi/evaluate/context/module.py @@ -204,7 +204,7 @@ class ModuleContext(use_metaclass(CachedMetaClass, TreeContext)): return names def py__class__(self): - return compiled.get_special_object(self.evaluator, 'MODULE_CLASS') + return compiled.get_special_object(self.evaluator, u'MODULE_CLASS') def __repr__(self): return "<%s: %s@%s-%s>" % (