We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
functools.wraps
1 parent 273052c commit 94cb58cCopy full SHA for 94cb58c
result_caching/__init__.py
@@ -1,13 +1,14 @@
1
+from collections import defaultdict, OrderedDict
2
+
3
import inspect
4
import itertools
5
import logging
6
+import numpy as np
7
import os
8
import pickle
-from collections import defaultdict, OrderedDict
-from typing import Union
-
9
-import numpy as np
10
import xarray as xr
+from functools import wraps
11
+from typing import Union
12
13
14
def get_function_identifier(function, call_args):
@@ -65,6 +66,7 @@ def __init__(self, identifier_ignore=()):
65
66
self._logger = logging.getLogger(_fullname(self))
67
68
def __call__(self, function):
69
+ @wraps(function)
70
def wrapper(*args, **kwargs):
71
call_args = self.getcallargs(function, *args, **kwargs)
72
function_identifier = self.get_function_identifier(function, call_args)
0 commit comments