From 025437546a842b01b4fca112f6e0f1cecae2c922 Mon Sep 17 00:00:00 2001 From: Junhao Liang <43094337+darkliang@users.noreply.github.com> Date: Thu, 29 Sep 2022 11:29:36 +0800 Subject: [PATCH] fix the Deprecation of inspect.getargspec() --- opengait/utils/common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opengait/utils/common.py b/opengait/utils/common.py index 7925747..ef1f9b6 100644 --- a/opengait/utils/common.py +++ b/opengait/utils/common.py @@ -43,9 +43,9 @@ def Ntuple(description, keys, values): def get_valid_args(obj, input_args, free_keys=[]): if inspect.isfunction(obj): - expected_keys = inspect.getargspec(obj)[0] + expected_keys = inspect.getfullargspec(obj)[0] elif inspect.isclass(obj): - expected_keys = inspect.getargspec(obj.__init__)[0] + expected_keys = inspect.getfullargspec(obj.__init__)[0] else: raise ValueError('Just support function and class object!') unexpect_keys = list()