Fix an issue about properties, fixes #1705

This commit is contained in:
Dave Halter
2020-12-28 00:54:40 +01:00
parent 5d2aed34f4
commit c64e33173a

View File

@@ -26,4 +26,9 @@ class Decoratee(ValueWrapper):
return signatures
# Fallback to signatures of the original function/class if the
# decorator has no signature or it is not inferrable.
return self._original_value.get_signatures()
#
# __get__ means that it's a descriptor. In that case we don't return
# signatures, because they are usually properties.
if not self._wrapped_value.py__getattribute__('__get__'):
return self._original_value.get_signatures()
return []