From: Štěpán Balážik Date: Mon, 9 Feb 2026 14:10:36 +0000 (+0100) Subject: Remove superfluous 'pylint: disable' directives X-Git-Tag: v9.21.19~15^2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=08f5e5ebd1ad4321579d7a685fb8c512793eeeef;p=thirdparty%2Fbind9.git Remove superfluous 'pylint: disable' directives Some of these have been fixed already, fix the rest. --- diff --git a/bin/tests/system/digdelv/yamlget.py b/bin/tests/system/digdelv/yamlget.py index afa582dd9ce..0919c13c603 100644 --- a/bin/tests/system/digdelv/yamlget.py +++ b/bin/tests/system/digdelv/yamlget.py @@ -13,8 +13,7 @@ import sys try: import yaml -# pylint: disable=bare-except -except: +except ImportError: print("No python yaml module, skipping") sys.exit(1) diff --git a/bin/tests/system/doth/stress_http_quota.py b/bin/tests/system/doth/stress_http_quota.py index 82730c25a5e..70ed382fc6a 100755 --- a/bin/tests/system/doth/stress_http_quota.py +++ b/bin/tests/system/doth/stress_http_quota.py @@ -135,9 +135,8 @@ class SubDIG: return command def run(self): - # pylint: disable=consider-using-with with open(os.devnull, "w", encoding="utf-8") as devnull: - self.sub_process = subprocess.Popen( + self.sub_process = subprocess.Popen( # pylint: disable=consider-using-with self.get_command(), shell=True, stdout=devnull ) diff --git a/bin/tests/system/isctest/vars/all.py b/bin/tests/system/isctest/vars/all.py index ba3f2a33814..a626ee18aeb 100644 --- a/bin/tests/system/isctest/vars/all.py +++ b/bin/tests/system/isctest/vars/all.py @@ -11,11 +11,8 @@ from collections import ChainMap -# pylint: enable=import-error from .algorithms import ALG_VARS, CRYPTO_SUPPORTED_VARS from .basic import BASIC_VARS - -# pylint: disable=import-error from .build import BUILD_VARS # type: ignore from .dirs import DIR_VARS from .features import FEATURE_VARS diff --git a/bin/tests/system/isctest/vars/basic.py b/bin/tests/system/isctest/vars/basic.py index 683bb600b73..6244d665ef6 100644 --- a/bin/tests/system/isctest/vars/basic.py +++ b/bin/tests/system/isctest/vars/basic.py @@ -11,12 +11,8 @@ import os -# pylint: disable=import-error from .build import BUILD_VARS # type: ignore -# pylint: enable=import-error - - BASIC_VARS = { "ARPANAME": f"{BUILD_VARS['TOP_BUILDDIR']}/arpaname", "CDS": f"{BUILD_VARS['TOP_BUILDDIR']}/dnssec-cds", diff --git a/bin/tests/system/isctest/vars/dirs.py b/bin/tests/system/isctest/vars/dirs.py index 88e8a81c8cb..7c2becafd92 100644 --- a/bin/tests/system/isctest/vars/dirs.py +++ b/bin/tests/system/isctest/vars/dirs.py @@ -11,12 +11,8 @@ import os -# pylint: disable=import-error from .build import BUILD_VARS, SYSTEM_TEST_DIR_GIT_PATH # type: ignore -# pylint: enable=import-error - - DIR_VARS = { "builddir": f"{BUILD_VARS['TOP_BUILDDIR']}/{SYSTEM_TEST_DIR_GIT_PATH}", "srcdir": f"{BUILD_VARS['TOP_SRCDIR']}/{SYSTEM_TEST_DIR_GIT_PATH}", diff --git a/bin/tests/system/keyfromlabel/tests_keyfromlabel.py b/bin/tests/system/keyfromlabel/tests_keyfromlabel.py index b088d431b78..ad3ad016039 100644 --- a/bin/tests/system/keyfromlabel/tests_keyfromlabel.py +++ b/bin/tests/system/keyfromlabel/tests_keyfromlabel.py @@ -86,7 +86,6 @@ def token_init_and_cleanup(): assert Re("Found token (.*) with matching token label") in cmd.out -# pylint: disable-msg=too-many-locals @pytest.mark.parametrize( "alg_name,alg_type,alg_bits", [ diff --git a/bin/tests/system/ksr/tests_ksr.py b/bin/tests/system/ksr/tests_ksr.py index 6b2cb21b651..e3fbf6dfa2b 100644 --- a/bin/tests/system/ksr/tests_ksr.py +++ b/bin/tests/system/ksr/tests_ksr.py @@ -509,7 +509,6 @@ def check_signedkeyresponse( # collect keys that should be in this bundle # collect lines that should be in this bundle bundle_keys.append(key) - # pylint: disable=unused-variable for _arg in expected_cds: bundle_lines.append(lines[line_no]) line_no += 1 diff --git a/bin/tests/system/nsec3/tests_nsec3_change.py b/bin/tests/system/nsec3/tests_nsec3_change.py index c8d2dcd42c7..9b9104cb7f1 100644 --- a/bin/tests/system/nsec3/tests_nsec3_change.py +++ b/bin/tests/system/nsec3/tests_nsec3_change.py @@ -9,8 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -# pylint: disable=redefined-outer-name,unused-import - import shutil import time diff --git a/bin/tests/system/nsec3/tests_nsec3_initial.py b/bin/tests/system/nsec3/tests_nsec3_initial.py index 2133a762654..465f11a76eb 100644 --- a/bin/tests/system/nsec3/tests_nsec3_initial.py +++ b/bin/tests/system/nsec3/tests_nsec3_initial.py @@ -9,8 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -# pylint: disable=redefined-outer-name,unused-import - import os import dns diff --git a/bin/tests/system/nsec3/tests_nsec3_reconfig.py b/bin/tests/system/nsec3/tests_nsec3_reconfig.py index e9aa7a6fd44..2a0bfecb274 100644 --- a/bin/tests/system/nsec3/tests_nsec3_reconfig.py +++ b/bin/tests/system/nsec3/tests_nsec3_reconfig.py @@ -9,8 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -# pylint: disable=redefined-outer-name,unused-import - import os import time diff --git a/bin/tests/system/nsec3/tests_nsec3_reload.py b/bin/tests/system/nsec3/tests_nsec3_reload.py index 920a84c3117..fb11f5fc27f 100644 --- a/bin/tests/system/nsec3/tests_nsec3_reload.py +++ b/bin/tests/system/nsec3/tests_nsec3_reload.py @@ -9,8 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -# pylint: disable=redefined-outer-name,unused-import - import shutil from nsec3.common import NSEC3_MARK, check_nsec3_case diff --git a/bin/tests/system/nsec3/tests_nsec3_restart.py b/bin/tests/system/nsec3/tests_nsec3_restart.py index 50b67aaef4b..b553ad120eb 100644 --- a/bin/tests/system/nsec3/tests_nsec3_restart.py +++ b/bin/tests/system/nsec3/tests_nsec3_restart.py @@ -9,8 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -# pylint: disable=redefined-outer-name,unused-import - import os import dns diff --git a/bin/tests/system/nsec3/tests_nsec3_retransfer.py b/bin/tests/system/nsec3/tests_nsec3_retransfer.py index d1cf0d53aad..ff0208593da 100644 --- a/bin/tests/system/nsec3/tests_nsec3_retransfer.py +++ b/bin/tests/system/nsec3/tests_nsec3_retransfer.py @@ -9,8 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -# pylint: disable=redefined-outer-name,unused-import - from datetime import timedelta import os diff --git a/bin/tests/system/rollover-algo-csk/tests_rollover_algo_csk_initial.py b/bin/tests/system/rollover-algo-csk/tests_rollover_algo_csk_initial.py index eaa66038ddf..7126f21766d 100644 --- a/bin/tests/system/rollover-algo-csk/tests_rollover_algo_csk_initial.py +++ b/bin/tests/system/rollover-algo-csk/tests_rollover_algo_csk_initial.py @@ -9,8 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -# pylint: disable=redefined-outer-name,unused-import - import pytest from isctest.util import param diff --git a/bin/tests/system/rollover-algo-csk/tests_rollover_algo_csk_reconfig.py b/bin/tests/system/rollover-algo-csk/tests_rollover_algo_csk_reconfig.py index afaf9df64a8..e83763e6012 100644 --- a/bin/tests/system/rollover-algo-csk/tests_rollover_algo_csk_reconfig.py +++ b/bin/tests/system/rollover-algo-csk/tests_rollover_algo_csk_reconfig.py @@ -9,8 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -# pylint: disable=redefined-outer-name,unused-import - import pytest from isctest.kasp import KeyTimingMetadata diff --git a/bin/tests/system/rollover-algo-ksk-zsk/tests_rollover_algo_ksk_zsk_initial.py b/bin/tests/system/rollover-algo-ksk-zsk/tests_rollover_algo_ksk_zsk_initial.py index f973e3f7f6a..7ad270f0e7e 100644 --- a/bin/tests/system/rollover-algo-ksk-zsk/tests_rollover_algo_ksk_zsk_initial.py +++ b/bin/tests/system/rollover-algo-ksk-zsk/tests_rollover_algo_ksk_zsk_initial.py @@ -9,8 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -# pylint: disable=unused-import - import pytest from isctest.util import param diff --git a/bin/tests/system/rollover-algo-ksk-zsk/tests_rollover_algo_ksk_zsk_reconfig.py b/bin/tests/system/rollover-algo-ksk-zsk/tests_rollover_algo_ksk_zsk_reconfig.py index ffeb539f2fb..23b57d80946 100644 --- a/bin/tests/system/rollover-algo-ksk-zsk/tests_rollover_algo_ksk_zsk_reconfig.py +++ b/bin/tests/system/rollover-algo-ksk-zsk/tests_rollover_algo_ksk_zsk_reconfig.py @@ -9,8 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -# pylint: disable=redefined-outer-name,unused-import - import pytest from isctest.kasp import KeyTimingMetadata diff --git a/bin/tests/system/rollover-csk-roll1/tests_rollover_csk_roll1.py b/bin/tests/system/rollover-csk-roll1/tests_rollover_csk_roll1.py index 70a661abc7d..49f015218cc 100644 --- a/bin/tests/system/rollover-csk-roll1/tests_rollover_csk_roll1.py +++ b/bin/tests/system/rollover-csk-roll1/tests_rollover_csk_roll1.py @@ -9,8 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -# pylint: disable=redefined-outer-name,unused-import - from datetime import timedelta import pytest diff --git a/bin/tests/system/rollover-csk-roll2/tests_rollover_csk_roll2.py b/bin/tests/system/rollover-csk-roll2/tests_rollover_csk_roll2.py index 3e665c44919..c71a129a0eb 100644 --- a/bin/tests/system/rollover-csk-roll2/tests_rollover_csk_roll2.py +++ b/bin/tests/system/rollover-csk-roll2/tests_rollover_csk_roll2.py @@ -9,8 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -# pylint: disable=redefined-outer-name,unused-import - from datetime import timedelta import pytest diff --git a/bin/tests/system/rollover-dynamic2inline/tests_rollover_dynamic2inline.py b/bin/tests/system/rollover-dynamic2inline/tests_rollover_dynamic2inline.py index 9350fe6035a..eff0fedc993 100644 --- a/bin/tests/system/rollover-dynamic2inline/tests_rollover_dynamic2inline.py +++ b/bin/tests/system/rollover-dynamic2inline/tests_rollover_dynamic2inline.py @@ -9,8 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -# pylint: disable=redefined-outer-name,unused-import - from rollover.common import CDSS, DEFAULT_CONFIG, ROLLOVER_MARK import isctest diff --git a/bin/tests/system/rollover-enable-dnssec/tests_rollover_enable_dnssec.py b/bin/tests/system/rollover-enable-dnssec/tests_rollover_enable_dnssec.py index cd1ef62e9e1..09a3bf2ee32 100644 --- a/bin/tests/system/rollover-enable-dnssec/tests_rollover_enable_dnssec.py +++ b/bin/tests/system/rollover-enable-dnssec/tests_rollover_enable_dnssec.py @@ -9,8 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -# pylint: disable=redefined-outer-name,unused-import - import pytest from isctest.kasp import Ipub, IpubC, Iret diff --git a/bin/tests/system/rollover-going-insecure/tests_rollover_going_insecure_initial.py b/bin/tests/system/rollover-going-insecure/tests_rollover_going_insecure_initial.py index ee4208b08f7..75580655641 100644 --- a/bin/tests/system/rollover-going-insecure/tests_rollover_going_insecure_initial.py +++ b/bin/tests/system/rollover-going-insecure/tests_rollover_going_insecure_initial.py @@ -9,8 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -# pylint: disable=redefined-outer-name,unused-import - import pytest from rollover.common import CDSS, DURATION, ROLLOVER_MARK, UNSIGNING_CONFIG diff --git a/bin/tests/system/rollover-going-insecure/tests_rollover_going_insecure_reconfig.py b/bin/tests/system/rollover-going-insecure/tests_rollover_going_insecure_reconfig.py index 4ea02c8654f..6afa632a3a3 100644 --- a/bin/tests/system/rollover-going-insecure/tests_rollover_going_insecure_reconfig.py +++ b/bin/tests/system/rollover-going-insecure/tests_rollover_going_insecure_reconfig.py @@ -9,8 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -# pylint: disable=redefined-outer-name,unused-import - import pytest from rollover.common import ( diff --git a/bin/tests/system/rollover-ksk-3crowd/tests_rollover_three_is_a_crowd.py b/bin/tests/system/rollover-ksk-3crowd/tests_rollover_three_is_a_crowd.py index 3c0fe98cd75..934343919c9 100644 --- a/bin/tests/system/rollover-ksk-3crowd/tests_rollover_three_is_a_crowd.py +++ b/bin/tests/system/rollover-ksk-3crowd/tests_rollover_three_is_a_crowd.py @@ -9,8 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -# pylint: disable=redefined-outer-name,unused-import - from datetime import timedelta from isctest.kasp import KeyTimingMetadata diff --git a/bin/tests/system/rollover-ksk-doubleksk/tests_rollover_ksk_doubleksk.py b/bin/tests/system/rollover-ksk-doubleksk/tests_rollover_ksk_doubleksk.py index d0e750fc963..6c7a43e777c 100644 --- a/bin/tests/system/rollover-ksk-doubleksk/tests_rollover_ksk_doubleksk.py +++ b/bin/tests/system/rollover-ksk-doubleksk/tests_rollover_ksk_doubleksk.py @@ -9,8 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -# pylint: disable=redefined-outer-name,unused-import - from datetime import timedelta import pytest diff --git a/bin/tests/system/rollover-lifetime/tests_rollover_lifetime_initial.py b/bin/tests/system/rollover-lifetime/tests_rollover_lifetime_initial.py index 9675f0618dc..449d5b8a769 100644 --- a/bin/tests/system/rollover-lifetime/tests_rollover_lifetime_initial.py +++ b/bin/tests/system/rollover-lifetime/tests_rollover_lifetime_initial.py @@ -9,8 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -# pylint: disable=redefined-outer-name,unused-import - import pytest from isctest.util import param diff --git a/bin/tests/system/rollover-lifetime/tests_rollover_lifetime_reconfig.py b/bin/tests/system/rollover-lifetime/tests_rollover_lifetime_reconfig.py index aff6c11619f..0576b83d50e 100644 --- a/bin/tests/system/rollover-lifetime/tests_rollover_lifetime_reconfig.py +++ b/bin/tests/system/rollover-lifetime/tests_rollover_lifetime_reconfig.py @@ -9,8 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -# pylint: disable=redefined-outer-name,unused-import - import pytest from isctest.util import param diff --git a/bin/tests/system/rollover-multisigner/tests_rollover_multisigner.py b/bin/tests/system/rollover-multisigner/tests_rollover_multisigner.py index 92d1f743ba5..c0c06f4b61f 100644 --- a/bin/tests/system/rollover-multisigner/tests_rollover_multisigner.py +++ b/bin/tests/system/rollover-multisigner/tests_rollover_multisigner.py @@ -9,8 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -# pylint: disable=redefined-outer-name,unused-import - from datetime import timedelta import os diff --git a/bin/tests/system/rollover-straight2none/tests_rollover_straight2none_initial.py b/bin/tests/system/rollover-straight2none/tests_rollover_straight2none_initial.py index ab8ffd372cc..8670193a178 100644 --- a/bin/tests/system/rollover-straight2none/tests_rollover_straight2none_initial.py +++ b/bin/tests/system/rollover-straight2none/tests_rollover_straight2none_initial.py @@ -9,8 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -# pylint: disable=redefined-outer-name,unused-import - import pytest from rollover.common import CDSS, DEFAULT_CONFIG, DURATION, ROLLOVER_MARK diff --git a/bin/tests/system/rollover-straight2none/tests_rollover_straight2none_reconfig.py b/bin/tests/system/rollover-straight2none/tests_rollover_straight2none_reconfig.py index 90ba61af2bd..edab463cd19 100644 --- a/bin/tests/system/rollover-straight2none/tests_rollover_straight2none_reconfig.py +++ b/bin/tests/system/rollover-straight2none/tests_rollover_straight2none_reconfig.py @@ -9,8 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -# pylint: disable=redefined-outer-name,unused-import - import pytest from rollover.common import CDSS, DEFAULT_CONFIG, DURATION, ROLLOVER_MARK diff --git a/bin/tests/system/rollover-zsk-prepub/tests_rollover_zsk_prepublication.py b/bin/tests/system/rollover-zsk-prepub/tests_rollover_zsk_prepublication.py index f87827dd21d..9e2aec2178e 100644 --- a/bin/tests/system/rollover-zsk-prepub/tests_rollover_zsk_prepublication.py +++ b/bin/tests/system/rollover-zsk-prepub/tests_rollover_zsk_prepublication.py @@ -9,8 +9,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -# pylint: disable=redefined-outer-name,unused-import - from datetime import timedelta import pytest diff --git a/bin/tests/system/tcp/tests_tcp.py b/bin/tests/system/tcp/tests_tcp.py index c8b301f8a87..62d2f45a8c8 100644 --- a/bin/tests/system/tcp/tests_tcp.py +++ b/bin/tests/system/tcp/tests_tcp.py @@ -11,8 +11,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -# pylint: disable=unused-variable - import socket import struct import time diff --git a/bin/tests/system/timeouts/tests_tcp_timeouts.py b/bin/tests/system/timeouts/tests_tcp_timeouts.py index 5b3e67c6d37..478c0a34588 100644 --- a/bin/tests/system/timeouts/tests_tcp_timeouts.py +++ b/bin/tests/system/timeouts/tests_tcp_timeouts.py @@ -11,8 +11,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -# pylint: disable=unused-variable - import socket import time @@ -25,7 +23,7 @@ import dns.rdataclass import dns.rdatatype import pytest -import isctest.mark # pylint: disable=import-error +import isctest.mark pytestmark = pytest.mark.extra_artifacts( [ diff --git a/bin/tests/system/tsig/tests_badtime.py b/bin/tests/system/tsig/tests_badtime.py index 60a47f55cbe..9981463346e 100644 --- a/bin/tests/system/tsig/tests_badtime.py +++ b/bin/tests/system/tsig/tests_badtime.py @@ -11,8 +11,6 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -# pylint: disable=unused-variable - import socket import time diff --git a/doc/arm/conf.py b/doc/arm/conf.py index f41c27bb907..3a58eb3fe6d 100644 --- a/doc/arm/conf.py +++ b/doc/arm/conf.py @@ -146,7 +146,6 @@ sys.path.append(str(Path(__file__).resolve().parent.parent / "misc")) # -- Project information ----------------------------------------------------- project = "BIND 9" -# pylint: disable=redefined-builtin copyright = "2023, Internet Systems Consortium" author = "Internet Systems Consortium" diff --git a/doc/man/conf.py b/doc/man/conf.py index 06431c35f7c..69061eaa4ee 100644 --- a/doc/man/conf.py +++ b/doc/man/conf.py @@ -35,11 +35,9 @@ sys.path.append(str(Path(__file__).resolve().parent.parent / "misc")) # -- Project information ----------------------------------------------------- project = "BIND 9" -# pylint: disable=wrong-import-position import datetime year = datetime.datetime.now().year -# pylint: disable=redefined-builtin copyright = "%d, Internet Systems Consortium" % year author = "Internet Systems Consortium" @@ -67,7 +65,6 @@ exclude_patterns = [ # The master toctree document. master_doc = "index" -# pylint: disable=line-too-long man_pages = [ ( "arpaname",