Skip to content

Commit 4a993e6

Browse files
aangelinalidr-Jess
andauthored
Fix analytics to work with Django ViewSet actions (#57)
* Fix analytics to work with Django ViewSet actions * Update to allow ci/cd to work * More lint --------- Co-authored-by: Jesse Zong <jessej.zong@gmail.com>
1 parent 82206f2 commit 4a993e6

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

analytics/analytics.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from abc import ABC, abstractmethod
44
from concurrent.futures import ThreadPoolExecutor
55
from enum import IntEnum
6+
from functools import wraps
67
from string import Template
78
from typing import Any, Callable, List, Optional, Type
89

@@ -151,6 +152,7 @@ def record_api_function(
151152
def decorator(func):
152153
explicit_args_names = func.__code__.co_varnames[: func.__code__.co_argcount]
153154

155+
@wraps(func)
154156
def wrapped_func(*args, **kwargs):
155157
explicit_args = analytics_recorder._extract_explicit_args(
156158
explicit_args_names, args, kwargs
@@ -205,6 +207,7 @@ def decorator(func):
205207
"UnaryFuncEntry can only be used with functions with a single argument"
206208
)
207209

210+
@wraps(func)
208211
def wrapped_func(*args, **kwargs):
209212
explicit_args = analytics_recorder._extract_explicit_args(
210213
explicit_args_names, args, kwargs

0 commit comments

Comments
 (0)