forked from VimPlug/jedi
Fix docstrings for method decorators, fixes #1621
This commit is contained in:
@@ -3,7 +3,7 @@ Decorators are not really values, however we need some wrappers to improve
|
||||
docstrings and other things around decorators.
|
||||
'''
|
||||
|
||||
from jedi.inference.base_value import ValueWrapper
|
||||
from jedi.inference.base_value import ValueWrapper, ValueSet
|
||||
|
||||
|
||||
class Decoratee(ValueWrapper):
|
||||
@@ -13,3 +13,9 @@ class Decoratee(ValueWrapper):
|
||||
|
||||
def py__doc__(self):
|
||||
return self._original_value.py__doc__()
|
||||
|
||||
def py__get__(self, instance, class_value):
|
||||
return ValueSet(
|
||||
Decoratee(v, self._original_value)
|
||||
for v in self._wrapped_value.py__get__(instance, class_value)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user