summaryrefslogtreecommitdiff
path: root/igor.py
diff options
context:
space:
mode:
Diffstat (limited to 'igor.py')
-rw-r--r--igor.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/igor.py b/igor.py
index 9db90f89..c4d0dc6e 100644
--- a/igor.py
+++ b/igor.py
@@ -364,14 +364,8 @@ def analyze_args(function):
star(boolean): Does `function` accept *args?
num_args(int): How many positional arguments does `function` have?
"""
- try:
- getargspec = inspect.getfullargspec
- except AttributeError:
- getargspec = inspect.getargspec
- with ignore_warnings():
- # DeprecationWarning: Use inspect.signature() instead of inspect.getfullargspec()
- argspec = getargspec(function)
- return bool(argspec[1]), len(argspec[0])
+ argspec = inspect.getfullargspec(function)
+ return bool(argspec.varargs), len(argspec.args)
def main(args):