]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Remove superfluous 'pylint: disable' directives
authorŠtěpán Balážik <stepan@isc.org>
Mon, 9 Feb 2026 14:10:36 +0000 (15:10 +0100)
committerŠtěpán Balážik <stepan@isc.org>
Wed, 25 Feb 2026 12:33:25 +0000 (13:33 +0100)
Some of these have been fixed already, fix the rest.

(cherry picked from commit 08f5e5ebd1ad4321579d7a685fb8c512793eeeef)

34 files changed:
bin/tests/convert_trs_to_junit.py
bin/tests/system/digdelv/yamlget.py
bin/tests/system/doth/stress_http_quota.py
bin/tests/system/keyfromlabel/tests_keyfromlabel.py
bin/tests/system/ksr/tests_ksr.py
bin/tests/system/nsec3/tests_nsec3_change.py
bin/tests/system/nsec3/tests_nsec3_initial.py
bin/tests/system/nsec3/tests_nsec3_reconfig.py
bin/tests/system/nsec3/tests_nsec3_reload.py
bin/tests/system/nsec3/tests_nsec3_restart.py
bin/tests/system/nsec3/tests_nsec3_retransfer.py
bin/tests/system/rollover-algo-csk/tests_rollover_algo_csk_initial.py
bin/tests/system/rollover-algo-csk/tests_rollover_algo_csk_reconfig.py
bin/tests/system/rollover-algo-ksk-zsk/tests_rollover_algo_ksk_zsk_initial.py
bin/tests/system/rollover-algo-ksk-zsk/tests_rollover_algo_ksk_zsk_reconfig.py
bin/tests/system/rollover-csk-roll1/tests_rollover_csk_roll1.py
bin/tests/system/rollover-csk-roll2/tests_rollover_csk_roll2.py
bin/tests/system/rollover-dynamic2inline/tests_rollover_dynamic2inline.py
bin/tests/system/rollover-enable-dnssec/tests_rollover_enable_dnssec.py
bin/tests/system/rollover-going-insecure/tests_rollover_going_insecure_initial.py
bin/tests/system/rollover-going-insecure/tests_rollover_going_insecure_reconfig.py
bin/tests/system/rollover-ksk-3crowd/tests_rollover_three_is_a_crowd.py
bin/tests/system/rollover-ksk-doubleksk/tests_rollover_ksk_doubleksk.py
bin/tests/system/rollover-lifetime/tests_rollover_lifetime_initial.py
bin/tests/system/rollover-lifetime/tests_rollover_lifetime_reconfig.py
bin/tests/system/rollover-multisigner/tests_rollover_multisigner.py
bin/tests/system/rollover-straight2none/tests_rollover_straight2none_initial.py
bin/tests/system/rollover-straight2none/tests_rollover_straight2none_reconfig.py
bin/tests/system/rollover-zsk-prepub/tests_rollover_zsk_prepublication.py
bin/tests/system/tcp/tests_tcp.py
bin/tests/system/timeouts/tests_tcp_timeouts.py
bin/tests/system/tsig/tests_badtime.py
doc/arm/conf.py
doc/man/conf.py

index 32a360ec296367da86fadcdc018829334f20cfa3..1e3bc3e79d83d583f969d214a738e7040d975281 100755 (executable)
@@ -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:
index afa582dd9ceb1ac8914d2ff5b2dbc0f19dae437a..0919c13c603949ddb870e7a56bc95d81127c91ca 100644 (file)
@@ -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)
 
index 82730c25a5e60901a69baac669717a583c8761a7..70ed382fc6ab528588fb67605c4b5fb999697bc2 100755 (executable)
@@ -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
             )
 
index 5ddf80334a8baee15b7c35915f3e35ab325a3392..e2f76c63dff3fe4c9d56f64d51f5bd961b5cd0bb 100644 (file)
@@ -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",
     [
index c6a2d1b87b6cebd2434259b04a49dc8974693d87..b9a21eac5b25f8b50b29ad11cda15219e27d3958 100644 (file)
@@ -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
index c8d2dcd42c78d35dd2c2e7824aa6d597e844502f..9b9104cb7f190df643b11d246e0db2b93743d884 100644 (file)
@@ -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
 
index aacdfbb435e21360dbda08156cd183421905f7ab..465f11a76eb28cf4e14504f393186feab827a540 100644 (file)
@@ -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
index e9aa7a6fd44756744969f1881589b0bd0e50f28a..2a0bfecb27468791803e097d1e5a42c6e9ab6511 100644 (file)
@@ -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
 
index 920a84c31179e8bc5df13311bbf0dace7b1c56b1..fb11f5fc27f3caa5ec7a9b9a7b02c4f9fbf7240e 100644 (file)
@@ -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
index 50b67aaef4b36e0d6e5846fc880bac632d52c31f..b553ad120eb75843f7d3e28a57e1ccaa6dc8b787 100644 (file)
@@ -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
index 83c4275ecb777483cbf835af78bcd2a6356d652a..a0266eceed834f4247ecc37fbb33cfc48371e6f7 100644 (file)
@@ -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
index 6f0cc1d86873db6696dfa187bef41f779345de13..be4856710aa1347200638dc08fcd5b573b4aebef 100644 (file)
@@ -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
index 94e7bee68f55ea48115029e4292c4a62fb89c519..abb1e257a45addadda70f3103688c81c7fb58668 100644 (file)
@@ -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
index 3ce4f7ff34c82a6e28c6393a763087a0247f8345..ec3d880fe5765027483feb66e554aa37e6f1f193 100644 (file)
@@ -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
index 16983c5559e48bf015eab9eea526879e9c956a63..9f472053ddf69f223fe42cdfa0dfa4d233cb3713 100644 (file)
@@ -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
index 824f6d78fb8fd851e1331c69c452ab2f33f429e9..3ec2c18c75c0118ef2fe7ed4810a81de0f2fc9cc 100644 (file)
@@ -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
index 28acd41909ddc871c18f3fc8a12a5088e24d92ed..e0c9b119e3dfd43c7f0484489c1779204953d8c7 100644 (file)
@@ -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
index 9350fe6035a87a56727f51187629dd2082d6b45c..eff0fedc993a5183dcf83fcaf9df7b2850afe7ca 100644 (file)
@@ -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
index 62c7276ba5ec26f00cd2b76b78488555df36b685..db9f018cc3863e021669361731e66d3c6efe222e 100644 (file)
@@ -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
index cfed5a3646c9797ccc3ce40888c58b92f7085ff4..599254d5560520cf3beb984a60cb1500a02852f3 100644 (file)
@@ -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
index fc110ca6738ac9e7b74ef5da5fa100137e71ba75..a5c05e1c136cabd995d20f16927399b6dfeb8f44 100644 (file)
@@ -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 (
index f0a4410e25d05c7f5f7e0e79cf2caac6926d433d..f4c72f6bcd04f1646e92da7ec3127c5a42bb9a5d 100644 (file)
@@ -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
index ab947348554bffd5b5dbe6e43efd55cfb08bec1a..eb73298bca2590389e7f363c84eea55ab46df402 100644 (file)
@@ -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
index 0f5d1423f64ea6e71283a5372e7083e8d2231545..5c63d852839a691b966b7b72ad358879d4093d5a 100644 (file)
@@ -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
index 04727620a1cfdd8a31e72526df273360a7d10fc4..894980f8acc48deb0ae5b17ca13ba0a668023167 100644 (file)
@@ -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
index f1ec60bec2e470996e852b1e06cbfef22c020551..f88cf8dd246057826f53faeafba92ce3f16f80a6 100644 (file)
@@ -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
index d776b5c9e017db035fff18d9b586e295ab5e6c8b..f25700281c821a933a641b6255c9dd6cc294522b 100644 (file)
@@ -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
index a3f618b6e691624a264264d913b51b04bea0d7b2..6738ee8bd2b7fab02c16c4ef54a42ef1434d4683 100644 (file)
@@ -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
index b4e816a260e0e2a1b9bf343285559f7de0096b7a..b5070e8647cd16f19d344bcf287504431598a0de 100644 (file)
@@ -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
index c8b301f8a87225869980affeaa9245a1ddfea1f0..62d2f45a8c8782dc0e30af866abb833873e8c044 100644 (file)
@@ -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
index ceea7c0a00c9dbebeb3a503ae492560624038307..478c0a345883108ef92284dcff66279fb89c7682 100644 (file)
@@ -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
 
index 60a47f55cbe4c854b2464a06de82a2dff616b9e5..9981463346ed9049e9b03e49cfa2dd60a8bc2b0d 100644 (file)
@@ -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
 
index 95a8dfd4c1c2a12021d7217ae5c741c317352671..dd6f2aa29e21b4c359137a120a52cabdc734fb01 100644 (file)
@@ -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"
 
index 1ba2af8b1f2ddbb9d2d4bde3ce6bfb3c6989e854..a8f8caecab01b70bb6fc6166f40b847a08ed3fc3 100644 (file)
 # -- 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",