mirror of
https://github.com/powerline/powerline.git
synced 2025-04-08 19:25:04 +02:00
Use functools.wraps on memoize decorator
This commit is contained in:
parent
d386ae71fd
commit
6dc81ab855
@ -1,5 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from functools import wraps
|
||||
import time
|
||||
|
||||
|
||||
@ -12,6 +13,7 @@ class memoize(object):
|
||||
self.additional_key = additional_key
|
||||
|
||||
def __call__(self, func):
|
||||
@wraps(func)
|
||||
def decorated_function(*args, **kwargs):
|
||||
if self.additional_key:
|
||||
key = (func.__name__, args, tuple(kwargs.items()), self.additional_key())
|
||||
|
Loading…
x
Reference in New Issue
Block a user