mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2024-11-22 05:31:33 +00:00
Use update_wrapper in lazy_property update attribute info
This commit is contained in:
parent
ab966f6d27
commit
2e3b49f8b5
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user