From 5d8d6b4d577dfb8b67cdf80e736f7778e338e5b6 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sun, 18 Jul 2021 07:56:31 -0400 Subject: build: update pylint and remove some unneeded warning suppression --- coverage/cmdline.py | 2 +- igor.py | 10 ++-------- requirements/dev.pip | 4 +--- tests/conftest.py | 15 --------------- 4 files changed, 4 insertions(+), 27 deletions(-) diff --git a/coverage/cmdline.py b/coverage/cmdline.py index 3d8dcf85..111be9f4 100644 --- a/coverage/cmdline.py +++ b/coverage/cmdline.py @@ -5,7 +5,7 @@ import glob -import optparse +import optparse # pylint: disable=deprecated-module import os.path import shlex import sys 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): diff --git a/requirements/dev.pip b/requirements/dev.pip index 551b2122..5c5887f3 100644 --- a/requirements/dev.pip +++ b/requirements/dev.pip @@ -15,9 +15,7 @@ tox # for linting. greenlet==1.1.0 -# pylint is now tightly pinning astroid: https://github.com/PyCQA/pylint/issues/4527 -#astroid==2.5.6 -pylint==2.8.3 +pylint==2.9.3 check-manifest==0.46 readme_renderer==29.0 diff --git a/tests/conftest.py b/tests/conftest.py index 4ae11542..81c13dd7 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -34,21 +34,6 @@ def set_warnings(): # Warnings to suppress: # How come these warnings are successfully suppressed here, but not in setup.cfg?? - # setuptools/py33compat.py:54: DeprecationWarning: The value of convert_charrefs will become - # True in 3.5. You are encouraged to set the value explicitly. - # unescape = getattr(html, 'unescape', html_parser.HTMLParser().unescape) - warnings.filterwarnings( - "ignore", - category=DeprecationWarning, - message=r"The value of convert_charrefs will become True in 3.5.", - ) - - warnings.filterwarnings( - "ignore", - category=DeprecationWarning, - message=r".* instead of inspect.getfullargspec", - ) - # :681: # ImportWarning: VendorImporter.exec_module() not found; falling back to load_module() warnings.filterwarnings( -- cgit v1.2.1