]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
join adjacent strings (formatting)
authorBob Halley <halley@dnspython.org>
Thu, 17 Mar 2022 12:29:55 +0000 (05:29 -0700)
committerBob Halley <halley@dnspython.org>
Thu, 17 Mar 2022 12:29:55 +0000 (05:29 -0700)
dns/message.py
dns/query.py
dns/rdtypes/svcbbase.py
dns/resolver.py
dns/transaction.py
dns/xfr.py
dns/zone.py
dns/zonefile.py

index 967fefea351eed46941cc57187f172eda8dd8aaa..709d71dd2301ab03157d79bcfb9412730aab6f72 100644 (file)
@@ -1073,7 +1073,7 @@ class _WireReader:
                     self.message.opt = dns.rrset.from_rdata(name, ttl, rd)
                 elif rdtype == dns.rdatatype.TSIG:
                     if self.keyring is None:
-                        raise UnknownTSIGKey("got signed message without " "keyring")
+                        raise UnknownTSIGKey("got signed message without keyring")
                     if isinstance(self.keyring, dict):
                         key = self.keyring.get(absolute_name)
                         if isinstance(key, bytes):
index 2c3da4f8ed59a953d305dd59d2f1a4e35fd53270..493d283c9b7ed8113bd4f05f0340aca72d0b0db0 100644 (file)
@@ -239,7 +239,7 @@ def _destination_and_source(
         elif af == socket.AF_INET6:
             source = "::"
         else:
-            raise ValueError("source_port specified but address family is " "unknown")
+            raise ValueError("source_port specified but address family is unknown")
     # Convert high-level (address, port) tuples into low-level address
     # tuples.
     if destination:
@@ -376,7 +376,7 @@ def https(
 
     if not _httpx_ok and not _have_requests:
         raise NoDOH(
-            "Cannot use httpx for this operation, and " "requests is not available."
+            "Cannot use httpx for this operation, and requests is not available."
         )
 
     with contextlib.ExitStack() as stack:
index a7bc27397edd02c1d663ab0816d19d565cc59ca7..b7e7a8586e7170dfef45f45b7ebd5caa448b14f9 100644 (file)
@@ -450,9 +450,7 @@ class SVCBBase(dns.rdata.Rdata):
                 # Note we have to say "not in" as we have None as a value
                 # so a get() and a not None test would be wrong.
                 if key not in params:
-                    raise ValueError(
-                        f"key {key:d} declared mandatory but not " "present"
-                    )
+                    raise ValueError(f"key {key:d} declared mandatory but not present")
         # The no-default-alpn parameter requires the alpn parameter.
         if ParamKey.NO_DEFAULT_ALPN in params:
             if ParamKey.ALPN not in params:
index f930369222ed693c48d927f5617c626e87abfd04..3b76100c90a3abd91e94104dc87002c8376532ca 100644 (file)
@@ -1115,7 +1115,7 @@ class BaseResolver:
             self._nameservers = nameservers
         else:
             raise ValueError(
-                "nameservers must be a list" " (not a {})".format(type(nameservers))
+                "nameservers must be a list (not a {})".format(type(nameservers))
             )
 
 
index b0429dfb1b671828a1f354d8fc5aca2dd561a92f..c4a9e1f6289324fa68544849ce0fe9145d5b7237 100644 (file)
@@ -480,7 +480,7 @@ class Transaction:
             self._raise_if_not_empty(method, args)
             if rdataset:
                 if rdataset.rdclass != self.manager.get_class():
-                    raise ValueError(f"{method} has objects of wrong " "RdataClass")
+                    raise ValueError(f"{method} has objects of wrong RdataClass")
                 existing = self._get_rdataset(name, rdataset.rdtype, rdataset.covers)
                 if existing is not None:
                     if exact:
index 89e92caf8d08d29c5c7ffe0dc1b5cee650a76a5c..bb165888918d95ea8cc86e7a9b0cdabcf6d92e38 100644 (file)
@@ -117,9 +117,7 @@ class Inbound:
             # the origin.
             #
             if not message.answer or message.answer[0].name != self.origin:
-                raise dns.exception.FormError(
-                    "No answer or RRset not " "for zone origin"
-                )
+                raise dns.exception.FormError("No answer or RRset not for zone origin")
             rrset = message.answer[0]
             rdataset = rrset
             if rdataset.rdtype != dns.rdatatype.SOA:
@@ -183,9 +181,7 @@ class Inbound:
                         self.rdtype == dns.rdatatype.IXFR
                         and self.serial != rdataset[0].serial
                     ):
-                        raise dns.exception.FormError(
-                            "unexpected end of IXFR " "sequence"
-                        )
+                        raise dns.exception.FormError("unexpected end of IXFR sequence")
                     self.txn.replace(name, rdataset)
                     self.txn.commit()
                     self.txn = None
@@ -208,9 +204,7 @@ class Inbound:
                             self.txn.replace(name, rdataset)
                     else:
                         # We saw a non-final SOA for the origin in an AXFR.
-                        raise dns.exception.FormError(
-                            "unexpected origin SOA " "in AXFR"
-                        )
+                        raise dns.exception.FormError("unexpected origin SOA in AXFR")
                 continue
             if self.expecting_SOA:
                 #
index d0d992848831f2a31380ea48b40b02c3112fc233..cba2e54f2063edc5dd61cefea08aab30c2495ab7 100644 (file)
@@ -121,9 +121,7 @@ class Zone(dns.transaction.TransactionManager):
             if isinstance(origin, str):
                 origin = dns.name.from_text(origin)
             elif not isinstance(origin, dns.name.Name):
-                raise ValueError(
-                    "origin parameter must be convertible to a " "DNS name"
-                )
+                raise ValueError("origin parameter must be convertible to a DNS name")
             if not origin.is_absolute():
                 raise ValueError("origin parameter must be an absolute name")
         self.origin = origin
index fd17073d4f6f2cd276016d482899a5b78451905f..4e0013a67b23b1bf47e708300aaa3615d669607b 100644 (file)
@@ -55,13 +55,13 @@ def _check_cname_and_other_data(txn, name, rdataset):
         node_kind == dns.node.NodeKind.CNAME
         and rdataset_kind == dns.node.NodeKind.REGULAR
     ):
-        raise CNAMEAndOtherData("rdataset type is not compatible with a " "CNAME node")
+        raise CNAMEAndOtherData("rdataset type is not compatible with a CNAME node")
     elif (
         node_kind == dns.node.NodeKind.REGULAR
         and rdataset_kind == dns.node.NodeKind.CNAME
     ):
         raise CNAMEAndOtherData(
-            "CNAME rdataset is not compatible with a " "regular data node"
+            "CNAME rdataset is not compatible with a regular data node"
         )
     # Otherwise at least one of the node and the rdataset is neutral, so
     # adding the rdataset is ok