diff --git a/jedi/_compatibility.py b/jedi/_compatibility.py index b1d8ddf0..ec74c129 100644 --- a/jedi/_compatibility.py +++ b/jedi/_compatibility.py @@ -198,24 +198,6 @@ def force_unicode(obj): return cast_path(obj) -def utf8_repr(func): - """ - ``__repr__`` methods in Python 2 don't allow unicode objects to be - returned. Therefore cast them to utf-8 bytes in this decorator. - """ - def wrapper(self): - result = func(self) - if isinstance(result, unicode): - return result.encode('utf-8') - else: - return result - - if is_py3: - return func - else: - return wrapper - - def pickle_load(file): try: return pickle.load(file)