]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
lint
authorBob Halley <halley@dnspython.org>
Tue, 4 Aug 2020 13:44:06 +0000 (06:44 -0700)
committerBob Halley <halley@dnspython.org>
Tue, 4 Aug 2020 13:44:06 +0000 (06:44 -0700)
Makefile
dns/rdtypes/ANY/CDNSKEY.py
dns/rdtypes/ANY/DNSKEY.py
dns/rdtypes/ANY/OPT.py
dns/rdtypes/ANY/TSIG.py
dns/rdtypes/IN/NAPTR.py
dns/rdtypes/IN/WKS.py
dns/rdtypes/util.py

index ff5115015e4ffdae454fd076438a675354593ac4..2e120ae967036b86af95ccbbf9eb5c1658f348ea 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -59,7 +59,7 @@ potype:
        poetry run python -m mypy examples tests dns/*.py
 
 polint:
-       poetry run pylint dns/*.py
+       poetry run pylint dns
 
 poflake:
        poetry run flake8 dns
index 7225318304f458a3ec31251a43cb852e9b7960ba..a8b1d8bac1eefd375bb785b63b7bbe748076923d 100644 (file)
 # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
 import dns.rdtypes.dnskeybase
-from dns.rdtypes.dnskeybase import SEP, REVOKE, ZONE  # noqa: F401
 
+# pylint: disable=unused-import
+from dns.rdtypes.dnskeybase import SEP, REVOKE, ZONE  # noqa: F401
+# pylint: enable=unused-import
 
 class CDNSKEY(dns.rdtypes.dnskeybase.DNSKEYBase):
 
index 2ee37988cc820a469038ce02ab525eee89477611..7173b4145a05d735d954c8ab0437e97579841a1e 100644 (file)
 # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
 import dns.rdtypes.dnskeybase
-from dns.rdtypes.dnskeybase import SEP, REVOKE, ZONE  # noqa: F401
 
+# pylint: disable=unused-import
+from dns.rdtypes.dnskeybase import SEP, REVOKE, ZONE  # noqa: F401
+# pylint: enable=unused-import
 
 class DNSKEY(dns.rdtypes.dnskeybase.DNSKEYBase):
 
index c48aa12faa8a10e131ed639b6e658eb119e3aea4..5d86d82802fa64da010f52c9368f4ef0d648bbbe 100644 (file)
@@ -22,6 +22,9 @@ import dns.exception
 import dns.rdata
 
 
+# We don't implement from_text, and that's ok.
+# pylint: disable=abstract-method
+
 class OPT(dns.rdata.Rdata):
 
     """OPT record"""
index 18db4c9e0ea9d32b88f6626e6691d752ebc4e836..537f9c347c03ce12d00b44b38a4e626f4ebb8beb 100644 (file)
@@ -21,6 +21,9 @@ import dns.exception
 import dns.rdata
 
 
+# We don't implement from_text, and that's ok.
+# pylint: disable=abstract-method
+
 class TSIG(dns.rdata.Rdata):
 
     """TSIG record"""
index a861b67ff6a78ae82c0c6a28ce37c2aecf30511e..f45262cafcef2e5e224e1e8045e24f82f65eccdb 100644 (file)
@@ -87,7 +87,7 @@ class NAPTR(dns.rdata.Rdata):
     def from_wire_parser(cls, rdclass, rdtype, parser, origin=None):
         (order, preference) = parser.get_struct('!HH')
         strings = []
-        for i in range(3):
+        for _ in range(3):
             s = parser.get_counted_bytes()
             strings.append(s)
         replacement = parser.get_name(origin)
index 9b5e87e65010e4e17dd59e0ee04a1c9b16362ba5..75444fb5a57dde7e919bdfb391a80332dfa420f4 100644 (file)
@@ -74,7 +74,7 @@ class WKS(dns.rdata.Rdata):
             i = serv // 8
             l = len(bitmap)
             if l < i + 1:
-                for j in range(l, i + 1):
+                for _ in range(l, i + 1):
                     bitmap.append(0)
             bitmap[i] = bitmap[i] | (0x80 >> (serv % 8))
         bitmap = dns.rdata._truncate_bitmap(bitmap)
index 3a089ed2c2f30d9369141813de8b27521af815e1..bac7e7a7e89f4db2bf0bb5c77dd7138db335c9d8 100644 (file)
@@ -68,6 +68,7 @@ class Gateway:
         else:
             raise dns.exception.SyntaxError(self._invalid_type())
 
+    # pylint: disable=unused-argument
     def to_wire(self, file, compress=None, origin=None, canonicalize=False):
         if self.type == 0:
             pass
@@ -79,6 +80,7 @@ class Gateway:
             self.gateway.to_wire(file, None, origin, False)
         else:
             raise ValueError(self._invalid_type())
+    # pylint: enable=unused-argument
 
     def from_wire_parser(self, parser, origin=None):
         if self.type == 0: