summaryrefslogtreecommitdiff
path: root/igor.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2021-07-18 07:56:31 -0400
committerNed Batchelder <ned@nedbatchelder.com>2021-07-18 10:51:31 -0400
commit5d8d6b4d577dfb8b67cdf80e736f7778e338e5b6 (patch)
treed9dc7736553495be63aea4f54a64b13f391c411a /igor.py
parent001d85cc7de2c3cabe16d3936fa2bbb4868c69d5 (diff)
downloadpython-coveragepy-git-5d8d6b4d577dfb8b67cdf80e736f7778e338e5b6.tar.gz
build: update pylint and remove some unneeded warning suppression
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):