From 2e3b49f8b5a697f0a35b4b6d118ff732f6a805c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Tue, 5 Jun 2018 00:15:43 +0200 Subject: [PATCH] Use update_wrapper in lazy_property update attribute info --- lib/tfw/decorators/lazy_property.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/tfw/decorators/lazy_property.py b/lib/tfw/decorators/lazy_property.py index 80ddbeb..c7e00c6 100644 --- a/lib/tfw/decorators/lazy_property.py +++ b/lib/tfw/decorators/lazy_property.py @@ -1,6 +1,8 @@ # Copyright (C) 2018 Avatao.com Innovative Learning Kft. # All Rights Reserved. See LICENSE file for details. +from functools import update_wrapper + class lazy_property: """ @@ -9,7 +11,7 @@ class lazy_property: """ def __init__(self, func): self.func = func - self.__doc__ = func.__doc__ + update_wrapper(self, func) def __get__(self, instance, owner): if instance is None: