Fix an issue with decoratee names

This commit is contained in:
Dave Halter
2020-06-27 01:10:04 +02:00
parent 344fef1e2f
commit 4846848a1e

View File

@@ -22,4 +22,9 @@ class Decoratee(ValueWrapper):
@property
def name(self):
if self._wrapped_value.is_function():
# If a function is returned, the name that we want is usually the
# original one. This is obviously a bit weird, but it works pretty
# well, since users don't pass around functions randomly.
return self._original_value.name
return self._wrapped_value.name