From 4c600fdcd49c5661b658c325100dcd7754b0a479 Mon Sep 17 00:00:00 2001 From: John Snow Date: Fri, 1 Nov 2024 13:36:59 -0400 Subject: python: disable too-many-positional-arguments warning Newest versions of pylint complain about specifically positional arguments in addition to too many in general. We already disable the general case, so silence this new warning too. Signed-off-by: John Snow Message-ID: <20241101173700.965776-4-jsnow@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- python/setup.cfg | 1 + 1 file changed, 1 insertion(+) (limited to 'python') diff --git a/python/setup.cfg b/python/setup.cfg index 3b4e2cc..cf5af7e 100644 --- a/python/setup.cfg +++ b/python/setup.cfg @@ -142,6 +142,7 @@ ignore_missing_imports = True disable=consider-using-f-string, consider-using-with, too-many-arguments, + too-many-positional-arguments, too-many-function-args, # mypy handles this with less false positives. too-many-instance-attributes, no-member, # mypy also handles this better. -- cgit v1.1 From 05fd7214d8262878ac4d8bf8909fa315f1f589a6 Mon Sep 17 00:00:00 2001 From: John Snow Date: Fri, 1 Nov 2024 13:37:00 -0400 Subject: python: silence pylint raising-non-exception error As of (at least) pylint 3.3.1, this code trips pylint up into believing we are raising something other than an Exception. We are not: the first two values may indeed be "None", but the last and final value must by definition be a SystemExit exception. Signed-off-by: John Snow Message-ID: <20241101173700.965776-5-jsnow@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- python/scripts/mkvenv.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'python') diff --git a/python/scripts/mkvenv.py b/python/scripts/mkvenv.py index f2526af..8ac5b0b 100644 --- a/python/scripts/mkvenv.py +++ b/python/scripts/mkvenv.py @@ -379,6 +379,9 @@ def make_venv( # pylint: disable=too-many-arguments try: builder.create(str(env_dir)) except SystemExit as exc: + # pylint 3.3 bug: + # pylint: disable=raising-non-exception, raise-missing-from + # Some versions of the venv module raise SystemExit; *nasty*! # We want the exception that prompted it. It might be a subprocess # error that has output we *really* want to see. -- cgit v1.1