From ebfc330e861c8e4a277239536f5e24446201f5a6 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Thu, 2 Jul 2020 01:32:17 +0200 Subject: [PATCH] Remove the unused utf8_repr function --- jedi/_compatibility.py | 18 ------------------ 1 file changed, 18 deletions(-) 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)