Skip to content

Commit

Permalink
#2 Fix to use getfullargspec instead of getargspec
Browse files Browse the repository at this point in the history
  • Loading branch information
astropenguin committed Jun 17, 2024
1 parent 917c8f8 commit 8f0d4f3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions scripts/libs/bbsweeplib/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ def get_cache(self, name):
else:
func = getattr(self, name)
orig_func = func.orig_func
argspec = inspect.getargspec(orig_func)
argspec = inspect.getfullargspec(orig_func)
# print argspec
args, varargs, kws, defaults = argspec
args, varargs, kws, defaults, *_ = argspec
# print argspec
if args == ['self'] and varargs is None and kws is None:
return func()
Expand Down
2 changes: 1 addition & 1 deletion scripts/libs/fit/fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def _fit(function, xs, ys, err=None, via=None, range=None, silent=False,
if type(function) == Expr_with_args:
tmpargs = function.arg_names
else:
argspec = inspect.getargspec(func)
argspec = inspect.getfullargspec(func)
tmpargs = argspec.args[1:]

## prepare params argument
Expand Down

0 comments on commit 8f0d4f3

Please sign in to comment.