From d0a6052ae58e0ec3398e8134fd1c957cad1b49ea Mon Sep 17 00:00:00 2001 From: Jakub Stasiak Date: Tue, 22 Sep 2020 20:56:26 +0200 Subject: [PATCH] Remove some no longer used Python 2-specific code --- injector/__init__.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/injector/__init__.py b/injector/__init__.py index 3eb36af..72ca4ae 100644 --- a/injector/__init__.py +++ b/injector/__init__.py @@ -236,15 +236,9 @@ def __str__(self) -> str: return self.args[0] instance, method, args, kwargs, original_error, stack = self.args - if hasattr(method, 'im_class'): - instance = method.__self__ - method_name = method.__func__.__name__ - else: - method_name = method.__name__ - cls = instance.__class__.__name__ if instance is not None else '' - full_method = '.'.join((cls, method_name)).strip('.') + full_method = '.'.join((cls, method.__name__)).strip('.') parameters = ', '.join( itertools.chain(