diff options
author | Yury Selivanov <yselivanov@sprymix.com> | 2015-08-06 13:34:09 -0400 |
---|---|---|
committer | Yury Selivanov <yselivanov@sprymix.com> | 2015-08-06 13:34:09 -0400 |
commit | b9833a94a988611d62d3f133dbdad6e2c7f5ffc7 (patch) | |
tree | c74e5d57ac1176c0a9aae9fca61e31b1ba646eb8 /igor.py | |
parent | 9c393875dccdef92c3d610533642799290c5f00a (diff) | |
download | python-coveragepy-b9833a94a988611d62d3f133dbdad6e2c7f5ffc7.tar.gz |
Stop using inspect.getargspec() function (removed in Python 3.6).
Diffstat (limited to 'igor.py')
-rw-r--r-- | igor.py | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -313,8 +313,11 @@ def analyze_args(function): star(boolean): Does `function` accept *args? num_args(int): How many positional arguments does `function` have? """ - with ignore_warnings(): - argspec = inspect.getargspec(function) + try: + getargspec = inspect.getfullargspec + except AttributeError: + getargspec = inspect.getargspec + argspec = getargspec(function) return bool(argspec[1]), len(argspec[0]) |