]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
Remove unnecessary string concatenation.
authorBrian Wellington <bwelling@xbill.org>
Tue, 11 Apr 2023 18:05:16 +0000 (11:05 -0700)
committerBrian Wellington <bwelling@xbill.org>
Tue, 11 Apr 2023 18:05:16 +0000 (11:05 -0700)
dns/asyncbackend.py
dns/dnssec.py
dns/query.py
dns/resolver.py
dns/transaction.py
dns/tsig.py

index e889ce7b3d967dcd5459289fe4fdb24a479bd245..b6d3211d226d6b4fed803f9235e7c4c23cb24408 100644 (file)
@@ -69,9 +69,7 @@ def sniff() -> str:
         try:
             return sniffio.current_async_library()
         except sniffio.AsyncLibraryNotFoundError:
-            raise AsyncLibraryNotFoundError(
-                "sniffio cannot determine " + "async library"
-            )
+            raise AsyncLibraryNotFoundError("sniffio cannot determine async library")
     except ImportError:
         import asyncio
 
index c219965d28b6c9b663cf16bdc36c017dc89d5fc8..0c19ee8050fd0d9ac5b48fecac4b785bdcad25b8 100644 (file)
@@ -1444,7 +1444,7 @@ def _sign_zone_nsec(
 
 def _need_pyca(*args, **kwargs):
     raise ImportError(
-        "DNSSEC validation requires " + "python cryptography"
+        "DNSSEC validation requires python cryptography"
     )  # pragma: no cover
 
 
index c4bd75e3add08d334728d78d5cb7157823da48d1..1a1b566d85041fceac9f0a216ea00cb412bc7f61 100644 (file)
@@ -317,7 +317,7 @@ def _destination_and_source(
             # We know the destination af, so source had better agree!
             if saf != af:
                 raise ValueError(
-                    "different address families for source " + "and destination"
+                    "different address families for source and destination"
                 )
         else:
             # We didn't know the destination af, but we know the source,
index 5788c95a02ae2ff3cfbb233fb073bc9f05fa1745..c28c137cac6fb480de40dde7c6468249e2b6652f 100644 (file)
@@ -187,7 +187,7 @@ Timeout = LifetimeTimeout
 class NoAnswer(dns.exception.DNSException):
     """The DNS response does not contain an answer to the question."""
 
-    fmt = "The DNS response does not contain an answer " + "to the question: {query}"
+    fmt = "The DNS response does not contain an answer to the question: {query}"
     supp_kwargs = {"response"}
 
     # We do this as otherwise mypy complains about unexpected keyword argument
index 91ed7329c03e56a39e4e5a76955497101e059267..37aa37a87c9d714dcfe5415fdcf5607e29efbdf8 100644 (file)
@@ -437,7 +437,7 @@ class Transaction:
                 rdataset = rrset.to_rdataset()
             else:
                 raise TypeError(
-                    f"{method} requires a name or RRset " + "as the first argument"
+                    f"{method} requires a name or RRset as the first argument"
                 )
             if rdataset.rdclass != self.manager.get_class():
                 raise ValueError(f"{method} has objects of wrong RdataClass")
@@ -496,7 +496,7 @@ class Transaction:
                 name = rdataset.name
             else:
                 raise TypeError(
-                    f"{method} requires a name or RRset " + "as the first argument"
+                    f"{method} requires a name or RRset as the first argument"
                 )
             self._raise_if_not_empty(method, args)
             if rdataset:
index 2476fdfb67390c4b9805749195c1b45c15560400..ca3be5908741b42d73aa390cfac7688774e8ad2f 100644 (file)
@@ -187,9 +187,7 @@ class HMACTSig:
         try:
             hashinfo = self._hashes[algorithm]
         except KeyError:
-            raise NotImplementedError(
-                f"TSIG algorithm {algorithm} " + "is not supported"
-            )
+            raise NotImplementedError(f"TSIG algorithm {algorithm} is not supported")
 
         # create the HMAC context
         if isinstance(hashinfo, tuple):