1
0
forked from VimPlug/jedi

Change Decoratee slightly

This commit is contained in:
Dave Halter
2020-06-27 01:30:27 +02:00
parent 4846848a1e
commit 7b15f1736c

View File

@@ -4,6 +4,7 @@ docstrings and other things around decorators.
'''
from jedi.inference.base_value import ValueWrapper, ValueSet
from jedi.inference.names import ValueName
class Decoratee(ValueWrapper):
@@ -26,5 +27,10 @@ class Decoratee(ValueWrapper):
# 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
val = self._original_value
else:
val = self._wrapped_value
if val.name.tree_name is not None:
return ValueName(self, val.name.tree_name)
return self._wrapped_value.name