]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Apply black formatting changes
authorNicki Křížek <nicki@isc.org>
Wed, 21 Jan 2026 21:40:56 +0000 (22:40 +0100)
committerNicki Křížek <nicki@isc.org>
Wed, 21 Jan 2026 21:40:56 +0000 (22:40 +0100)
Generated by black 26.1.0 which got updated in CI.

29 files changed:
bin/tests/system/bailiwick/ans1/ans.py
bin/tests/system/bailiwick/ans2/ans.py
bin/tests/system/checkds/tests_checkds.py
bin/tests/system/conftest.py
bin/tests/system/cookie/ans9/ans.py
bin/tests/system/isctest/asyncserver.py
bin/tests/system/isctest/log/basic.py
bin/tests/system/isctest/log/watchlog.py
bin/tests/system/isctest/mark.py
bin/tests/system/isctest/text.py
bin/tests/system/keepalive/tests_keepalive.py
bin/tests/system/keyfromlabel/tests_keyfromlabel.py
bin/tests/system/mkeys/tests_sh_mkeys.py
bin/tests/system/optout/tests_optout.py
bin/tests/system/pipelined/ans5/ans.py
bin/tests/system/rndc/tests_cve-2023-3341.py
bin/tests/system/rpzextra/tests_rpzextra.py
bin/tests/system/selftest/tests_zone_analyzer.py
bin/tests/system/statschannel/generic.py
bin/tests/system/statschannel/tests_json.py
bin/tests/system/statschannel/tests_xml.py
bin/tests/system/tcp/ans6/ans.py
bin/tests/system/timeouts/tests_tcp_timeouts.py
bin/tests/system/tsig/tests_tsig_hypothesis.py
bin/tests/system/xferquota/setup.py
contrib/gitchangelog/gitchangelog.py
doc/arm/_ext/iscconf.py
doc/arm/_ext/namedconf.py
doc/misc/parsegrammar.py

index f0b152ac3d7931b7f4359d83253f0dcd58957aa7..859e77491f09fbb0ad9e1c90cb566c18a337cccc 100644 (file)
@@ -24,7 +24,6 @@ from isctest.asyncserver import (
 
 from bailiwick_ans import ResponseSpoofer, spoofing_server
 
-
 ATTACKER_IP = "10.53.0.3"
 TTL = 3600
 
index 1a9be3d931ed2f98fb4c81eedcfb833f1ecb54bb..151a2c6cccea2f2c35eb2508f82cabbbd8675b63 100644 (file)
@@ -24,7 +24,6 @@ from isctest.asyncserver import (
 
 from bailiwick_ans import ResponseSpoofer, spoofing_server
 
-
 ATTACKER_IP = "10.53.0.3"
 TTL = 3600
 
index 50dc2c0222c5067d9bcb810cbd94e33caf0d2481..f42c33f63bdd365412aafad18b1ccdc952ef3eb2 100755 (executable)
@@ -28,7 +28,6 @@ import dns.rcode
 import dns.rdataclass
 import dns.rdatatype
 
-
 pytestmark = [
     pytest.mark.skipif(
         sys.version_info < (3, 7), reason="Python >= 3.7 required [GL #3001]"
index fe3e406367b2af85107b67716c8a6b5e06cb5ae1..790bb66e9c702394300bf760e1c68fc3b15ffd2c 100644 (file)
@@ -27,7 +27,6 @@ pytest.register_assert_rewrite("isctest")
 
 import isctest
 
-
 # Silence warnings caused by passing a pytest fixture to another fixture.
 # pylint: disable=redefined-outer-name
 
index 1a477f872c187a262cbb6d2c42e123c346bb3ed0..3b0f82cc1d4a86ca25fa2f6f87e76de24e70e42e 100644 (file)
@@ -294,7 +294,7 @@ while running:
 
         if s == query4_tcp1 or s == query6_tcp1 or s == query4_tcp2 or s == query6_tcp2:
             try:
-                (cs, _) = s.accept()
+                cs, _ = s.accept()
                 if s == query4_tcp1 or s == query6_tcp1:
                     print(
                         "TCP Query received on %s"
index eeca1b88eced25c97f60cac4629a9649918f8680..d35710ba5d4004ae3b496ed9ab6ca5b75b5cbbe2 100644 (file)
@@ -55,7 +55,6 @@ import dns.tsig
 import dns.version
 import dns.zone
 
-
 _UdpHandler = Callable[
     [bytes, Tuple[str, int], asyncio.DatagramTransport], Coroutine[Any, Any, None]
 ]
index 38ffab9bfc431418cafcd8da555fd2c6857810b7..41b5ee68a1fbe5b62e5331d511e68a481d92af93 100644 (file)
@@ -14,7 +14,6 @@ from pathlib import Path
 import textwrap
 from typing import Dict, Optional
 
-
 CONFTEST_LOGGER = logging.getLogger("conftest")
 LOG_FORMAT = "%(asctime)s %(levelname)7s:%(name)s  %(message)s"
 LOG_INDENT = 4
index 447879662a0d7c662d40ab644e9ea4e0c8f51b0f..d7154995b7d9b8698e10bf43a445f28a48f70dc4 100644 (file)
@@ -17,7 +17,6 @@ import time
 
 from isctest.text import compile_pattern, FlexPattern, LineReader
 
-
 T = TypeVar("T")
 OneOrMore = Union[T, List[T]]
 
index ccd57090df85e45cabd263c7e3731f8943056ce2..53860a806cfffc638f6417a71961fab33ef09eea 100644 (file)
@@ -20,7 +20,6 @@ import subprocess
 
 import pytest
 
-
 long_test = pytest.mark.skipif(
     not os.environ.get("CI_ENABLE_LONG_TESTS"), reason="CI_ENABLE_LONG_TESTS not set"
 )
index ca3cc835e71f7d129306bfb0f98654ca29b7e5d2..33798c37032863a9849a96b796c22366eabe85c1 100644 (file)
@@ -16,7 +16,6 @@ import re
 from re import compile as Re
 from typing import Iterator, List, Match, Optional, Pattern, TextIO, Union
 
-
 FlexPattern = Union[str, Pattern]
 
 
index d09d566f6ee31d73d95d72783dab5ee6cc8a2c06..032faf04a3b15b38308c8755c1c2733896e0b0b7 100644 (file)
@@ -12,7 +12,6 @@
 import isctest
 import pytest
 
-
 pytestmark = pytest.mark.extra_artifacts(
     ["ns2/named.stats"],
 )
index f2c1c0bea2c5c59729873f4ae786b23b45a6c511..4cafa46d835143ce55ebc80d563d35f72e27811b 100644 (file)
@@ -18,7 +18,6 @@ import pytest
 
 import isctest.mark
 
-
 pytestmark = [
     isctest.mark.supported_openssl_version,
     isctest.mark.softhsm2_environment,
index d809d105d9d9ef8d41076704d5c43357c8c6c05f..8df669884e7f0947d72a1bb2df28ecb61a57f577 100644 (file)
@@ -11,7 +11,6 @@
 
 import pytest
 
-
 pytestmark = pytest.mark.extra_artifacts(
     [
         "delv.*",
index ce5071ffa79cf56dd5defc5bab779102a539bac6..4652a35e32334f5446b6c0c5ef8c40ff26ca5edb 100755 (executable)
@@ -28,7 +28,6 @@ import dns.rcode
 import dns.rdataclass
 import dns.rdatatype
 
-
 pytestmark = [
     pytest.mark.skipif(
         sys.version_info < (3, 7), reason="Python >= 3.7 required [GL #3001]"
index b58ad84bef9eb874cf0f9a715e73a19692b02087..51f10ba3c7025160e527995a5bf3d5644c96260b 100644 (file)
@@ -199,7 +199,7 @@ def main():
 
     while True:
         try:
-            (clientsock, _) = sock.accept()
+            clientsock, _ = sock.accept()
             log("Accepted connection from %s" % clientsock)
             thread = TCPDelayer(clientsock, serverip, port)
             thread.start()
index 73a5117e9f0988728b15580aa4999258a5629405..90f2218a9bca044aaf449cf2068896be50cd6d25 100644 (file)
@@ -18,7 +18,6 @@ import pytest
 
 import isctest
 
-
 pytestmark = pytest.mark.extra_artifacts(
     [
         "ns2/nil.db",
index e6a83249424714147dc7f72c7504b0d62a8123af..7e9414c0ba69d1f076c0b29602850951369b254d 100644 (file)
@@ -21,7 +21,6 @@ import dns.rrset
 
 import isctest
 
-
 pytestmark = pytest.mark.extra_artifacts(
     [
         "ns3/*-rpz-external.local.db",
index 9cea8c7986ed5a80098f100f28c62f9595420b20..dcbe45519db979f22b4b44cf4bd69f186f454197 100755 (executable)
@@ -14,7 +14,6 @@ isctest.name.ZoneAnalyzer self-test
 Generate insane test zone and check expected output of ZoneAnalyzer utility class
 """
 
-
 import collections
 import itertools
 from pathlib import Path
index 611d396925793e5c5f29fcde4d3212d971722638..fa64f5c483bb764df4318f7bba055ddbfeb56097 100644 (file)
@@ -20,7 +20,6 @@ import dns.rcode
 
 import isctest
 
-
 # ISO datetime format without msec
 fmt = "%Y-%m-%dT%H:%M:%SZ"
 
@@ -87,7 +86,7 @@ def test_zone_timers_primary(fetch_zones, load_timers, **kwargs):
     zones = fetch_zones(statsip, statsport)
 
     for zone in zones:
-        (name, loaded, expires, refresh) = load_timers(zone, True)
+        name, loaded, expires, refresh = load_timers(zone, True)
         mtime = zone_mtime(zonedir, name)
         check_zone_timers(loaded, expires, refresh, mtime)
 
@@ -103,7 +102,7 @@ def test_zone_timers_secondary(fetch_zones, load_timers, **kwargs):
         zones = fetch_zones(statsip, statsport)
         again = False
         for zone in zones:
-            (name, loaded, expires, refresh) = load_timers(zone, False)
+            name, loaded, expires, refresh = load_timers(zone, False)
             mtime = zone_mtime(zonedir, name)
             if (mtime != dayzero) or (tries == 0):
                 # mtime was either retrieved successfully or no tries were
index 9e9a2dc405f7b2c7cc875edd166082b9fdb9ee55..0817363f15d68c488ccd133dc34ae1951e310392 100755 (executable)
@@ -21,7 +21,6 @@ import isctest.mark
 pytest.register_assert_rewrite("generic")
 import generic
 
-
 pytestmark = [
     isctest.mark.have_json_c,
     pytest.mark.extra_artifacts(
index d41fc4fc766a35360f3e3c105c483700f527fe67..cffb8d14222494ba10671f89a984815003c1c971 100755 (executable)
@@ -22,7 +22,6 @@ import isctest.mark
 pytest.register_assert_rewrite("generic")
 import generic
 
-
 pytestmark = [
     isctest.mark.have_libxml2,
     pytest.mark.extra_artifacts(
index b94697e2cd9fcfca018191a7e305c0dd4efcbbe2..a9df8b7df7dc8d41d9ad29915999659e00fa3461 100644 (file)
@@ -39,7 +39,6 @@ import socket
 import sys
 import time
 
-
 # Timeout for establishing all connections requested by a single 'open' command.
 OPEN_TIMEOUT = 2
 VERSION_QUERY = b"\x00\x1e\xaf\xb8\x01\x00\x00\x01\x00\x00\x00\x00\x00\x00\x07version\x04bind\x00\x00\x10\x00\x03"
@@ -136,7 +135,7 @@ def main():
     ctlsock.listen(1)
 
     while True:
-        (clientsock, _) = ctlsock.accept()
+        clientsock, _ = ctlsock.accept()
         log("Accepted control connection from %s" % clientsock)
         cmdline = clientsock.recv(512).decode("ascii").strip()
         if cmdline:
index e25bba5a042966ba180e2a037d978f773d44455e..ca982ef6c9f4d7779ce125b94c619555b92eeff6 100644 (file)
@@ -170,7 +170,7 @@ def test_long_axfr(named_port):
         dns.query.send_tcp(sock, msg, timeout())
 
         # Receive the initial DNS message with SOA
-        (response, _) = dns.query.receive_tcp(sock, timeout(), one_rr_per_rrset=True)
+        response, _ = dns.query.receive_tcp(sock, timeout(), one_rr_per_rrset=True)
         soa = response.get_rrset(
             dns.message.ANSWER, name, dns.rdataclass.IN, dns.rdatatype.SOA
         )
@@ -178,9 +178,7 @@ def test_long_axfr(named_port):
 
         # Pull DNS message from wire until the second SOA is received
         while True:
-            (response, _) = dns.query.receive_tcp(
-                sock, timeout(), one_rr_per_rrset=True
-            )
+            response, _ = dns.query.receive_tcp(sock, timeout(), one_rr_per_rrset=True)
             soa = response.get_rrset(
                 dns.message.ANSWER, name, dns.rdataclass.IN, dns.rdatatype.SOA
             )
@@ -226,7 +224,7 @@ def test_max_transfer_idle_out(named_port):
         dns.query.send_tcp(sock, msg, timeout())
 
         # Receive the initial DNS message with SOA
-        (response, _) = dns.query.receive_tcp(sock, timeout(), one_rr_per_rrset=True)
+        response, _ = dns.query.receive_tcp(sock, timeout(), one_rr_per_rrset=True)
         soa = response.get_rrset(
             dns.message.ANSWER, name, dns.rdataclass.IN, dns.rdatatype.SOA
         )
@@ -237,7 +235,7 @@ def test_max_transfer_idle_out(named_port):
         with pytest.raises(ConnectionResetError):
             # Process queued TCP messages
             while True:
-                (response, _) = dns.query.receive_tcp(
+                response, _ = dns.query.receive_tcp(
                     sock, timeout(), one_rr_per_rrset=True
                 )
                 soa = response.get_rrset(
@@ -258,7 +256,7 @@ def test_max_transfer_time_out(named_port):
         dns.query.send_tcp(sock, msg, timeout())
 
         # Receive the initial DNS message with SOA
-        (response, _) = dns.query.receive_tcp(sock, timeout(), one_rr_per_rrset=True)
+        response, _ = dns.query.receive_tcp(sock, timeout(), one_rr_per_rrset=True)
         soa = response.get_rrset(
             dns.message.ANSWER, name, dns.rdataclass.IN, dns.rdatatype.SOA
         )
@@ -268,7 +266,7 @@ def test_max_transfer_time_out(named_port):
         with pytest.raises(EOFError):
             while True:
                 time.sleep(1)
-                (response, _) = dns.query.receive_tcp(
+                response, _ = dns.query.receive_tcp(
                     sock, timeout(), one_rr_per_rrset=True
                 )
                 soa = response.get_rrset(
index 3e134d5bb077f3b239fde1223c97c58c0786da58..858ee5e04ac142147ee690888120456d932984b2 100644 (file)
@@ -34,7 +34,6 @@ from isctest.hypothesis.strategies import dns_names, uint
 from hypothesis import assume, example, given, HealthCheck, settings
 from hypothesis.strategies import binary, booleans, composite, just, sampled_from
 
-
 pytestmark = pytest.mark.extra_artifacts(
     [
         "ans*/ans.run",
index cbbb0529da8846e36cc49b29f2de68d52153e976..ec457bf171f3c88a424427752dc5200cac7312b3 100644 (file)
@@ -20,8 +20,7 @@ zones = 300
 for z in range(zones):
     zn = f"zone{z:06d}.example"
     with open(f"ns1/{zn}.db", "w", encoding="utf-8") as f:
-        f.write(
-            """$TTL 300
+        f.write("""$TTL 300
 @    IN SOA    ns1 . 1 300 120 3600 86400
         NS      ns1
         NS      ns2
@@ -31,8 +30,7 @@ ns2     A       10.53.0.2
         MX      20 mail2.isp.example.
 www     A       10.0.0.1
 xyzzy   A       10.0.0.2
-"""
-        )
+""")
 
 with open("ns1/zones.conf", "w", encoding="utf-8") as priconf, open(
     "ns2/zones.conf", "w", encoding="utf-8"
index 33583185b9a66814e8f7d8d345f6ae4b40b62e71..262a41c55219cd52781b6ab0e3e5ab4b689e087e 100755 (executable)
@@ -483,7 +483,7 @@ class TextProc(object):
             return TextProc(lambda text: value.fun(self.fun(text)))
         import inspect
 
-        (_frame, filename, lineno, _function_name, lines, _index) = inspect.stack()[1]
+        _frame, filename, lineno, _function_name, lines, _index = inspect.stack()[1]
         raise SyntaxError(
             "Invalid syntax in config file",
             (
@@ -2084,10 +2084,7 @@ def safe_print(content):
             raise
         ## XXXvlab: should use $COLUMNS in bash and for windows:
         ## http://stackoverflow.com/questions/14978548
-        stderr(
-            paragraph_wrap(
-                textwrap.dedent(
-                    """\
+        stderr(paragraph_wrap(textwrap.dedent("""\
             UnicodeEncodeError:
               There was a problem outputing the resulting changelog to
               your console.
@@ -2095,11 +2092,7 @@ def safe_print(content):
               This probably means that the changelog contains characters
               that can't be translated to characters in your current charset
               (%s).
-            """
-                )
-                % sys.stdout.encoding
-            )
-        )
+            """) % sys.stdout.encoding))
         if WIN32 and PY_VERSION < 3.6 and sys.stdout.encoding != "utf-8":
             ## As of PY 3.6, encoding is now ``utf-8`` regardless of
             ## PYTHONIOENCODING
index dc440e292840eaffe1d7519046f859e4b4bce1d0..431319411945bd376d8f9d4dddaa3b0027087cf3 100644 (file)
@@ -35,7 +35,6 @@ from sphinx.util.nodes import make_refnode
 
 import checkgrammar
 
-
 logger = logging.getLogger(__name__)
 
 
index bcf4a0c00782dcbd8ff3b08142d62eff38930b62..2578d0df5b6a35e7e8ac5a991da47b433337deb0 100644 (file)
@@ -15,6 +15,7 @@
 Sphinx domain "namedconf". See iscconf.py for details.
 
 """
+
 from docutils import nodes
 
 import iscconf
index b3fede04e508195449cd55c011f61bdbbe329b51..eff382639bcb5e2788ccd669d16af38d18b28394 100644 (file)
@@ -59,6 +59,7 @@ end node, key "_mapbody" denotes a nested map.
     }
 }
 """
+
 import fileinput
 import json
 import re