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.20.20~5^2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5fc2b9b2f3f087784a7cf24383810972c84dacc9;p=thirdparty%2Fbind9.git Remove superfluous 'pylint: disable' directives Some of these have been fixed already, fix the rest. (cherry picked from commit 08f5e5ebd1ad4321579d7a685fb8c512793eeeef) --- diff --git a/bin/tests/convert_trs_to_junit.py b/bin/tests/convert_trs_to_junit.py index 32a360ec296..1e3bc3e79d8 100755 --- a/bin/tests/convert_trs_to_junit.py +++ b/bin/tests/convert_trs_to_junit.py @@ -14,16 +14,14 @@ import os import sys -# getting explicit encoding specification right for Python 2/3 would be messy, -# so let's hope for the best def read_whole_text(filename): - with open(filename) as inf: # pylint: disable-msg=unspecified-encoding + with open(filename, encoding="utf-8") as inf: return inf.read().strip() def read_trs_result(filename): result = None - with open(filename, "r") as trs: # pylint: disable-msg=unspecified-encoding + with open(filename, "r", encoding="utf-8") as trs: for line in trs: items = line.split() if len(items) < 2: 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/keyfromlabel/tests_keyfromlabel.py b/bin/tests/system/keyfromlabel/tests_keyfromlabel.py index 5ddf80334a8..e2f76c63dff 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 c6a2d1b87b6..b9a21eac5b2 100644 --- a/bin/tests/system/ksr/tests_ksr.py +++ b/bin/tests/system/ksr/tests_ksr.py @@ -515,7 +515,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 aacdfbb435e..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,unspecified-encoding,multiple-statements,use-maxsplit-arg,broad-exception-caught,f-string-without-interpolation - 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 83c4275ecb7..a0266eceed8 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 6f0cc1d8687..be4856710aa 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 94e7bee68f5..abb1e257a45 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 3ce4f7ff34c..ec3d880fe57 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 16983c5559e..9f472053ddf 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 824f6d78fb8..3ec2c18c75c 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 28acd41909d..e0c9b119e3d 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 62c7276ba5e..db9f018cc38 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 cfed5a3646c..599254d5560 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 fc110ca6738..a5c05e1c136 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 f0a4410e25d..f4c72f6bcd0 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 ab947348554..eb73298bca2 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 0f5d1423f64..5c63d852839 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 04727620a1c..894980f8acc 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 f1ec60bec2e..f88cf8dd246 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 d776b5c9e01..f25700281c8 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 a3f618b6e69..6738ee8bd2b 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 b4e816a260e..b5070e8647c 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 ceea7c0a00c..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 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 95a8dfd4c1c..dd6f2aa29e2 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 1ba2af8b1f2..a8f8caecab0 100644 --- a/doc/man/conf.py +++ b/doc/man/conf.py @@ -31,11 +31,9 @@ # -- 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" @@ -65,7 +63,6 @@ exclude_patterns = [ # The master toctree document. master_doc = "index" -# pylint: disable=line-too-long man_pages = [ ( "arpaname",