Merge "Replace deprecated inspector.getargspec"

This commit is contained in:
Zuul 2024-05-09 12:25:47 +00:00 committed by Gerrit Code Review
commit 260925ec64

View File

@ -89,7 +89,7 @@ def validate_args(fn, *args, **kwargs):
:param arg: the positional arguments supplied
:param kwargs: the keyword arguments supplied
"""
argspec = inspect.getargspec(fn)
argspec = inspect.getfullargspec(fn)
num_defaults = len(argspec.defaults or [])
required_args = argspec.args[:len(argspec.args) - num_defaults]