]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
lint
authorBob Halley <halley@dnspython.org>
Fri, 23 Dec 2022 17:24:21 +0000 (09:24 -0800)
committerBob Halley <halley@dnspython.org>
Fri, 23 Dec 2022 17:24:21 +0000 (09:24 -0800)
dns/dnssec.py

index d380ea17dbd1112c423553666482ff257e98ec12..5dc26223f2e683cd720608b7b299b4fbf7e5c133 100644 (file)
@@ -195,7 +195,8 @@ def make_ds(
 
     *name*, a ``dns.name.Name`` or ``str``, the owner name of the DS record.
 
-    *key*, a ``dns.rdtypes.ANY.DNSKEY.DNSKEY`` or ``dns.rdtypes.ANY.DNSKEY.CDNSKEY``, the key the DS is about.
+    *key*, a ``dns.rdtypes.ANY.DNSKEY.DNSKEY`` or ``dns.rdtypes.ANY.DNSKEY.CDNSKEY``,
+    the key the DS is about.
 
     *algorithm*, a ``str`` or ``int`` specifying the hash algorithm.
     The currently supported hashes are "SHA1", "SHA256", and "SHA384". Case
@@ -268,7 +269,8 @@ def make_cds(
 
     *name*, a ``dns.name.Name`` or ``str``, the owner name of the DS record.
 
-    *key*, a ``dns.rdtypes.ANY.DNSKEY.DNSKEY`` or ``dns.rdtypes.ANY.DNSKEY.CDNSKEY``,  key the DS is about.
+    *key*, a ``dns.rdtypes.ANY.DNSKEY.DNSKEY`` or ``dns.rdtypes.ANY.DNSKEY.CDNSKEY``,
+    the key the DS is about.
 
     *algorithm*, a ``str`` or ``int`` specifying the hash algorithm.
     The currently supported hashes are "SHA1", "SHA256", and "SHA384". Case
@@ -1115,7 +1117,7 @@ def make_ds_rdataset(
         for rdata in cds_rdataset_to_ds_rdataset(rdataset):
             if rdata.digest_type in _algorithms:
                 res.append(rdata)
-        if not len(res):
+        if len(res) == 0:
             raise ValueError("no acceptable CDS rdata found")
         return dns.rdataset.from_rdata_list(rdataset.ttl, res)