]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
Fix more latest pylint warnings.
authorBob Halley <halley@dnspython.org>
Tue, 30 May 2017 19:22:54 +0000 (12:22 -0700)
committerBob Halley <halley@dnspython.org>
Tue, 30 May 2017 19:22:54 +0000 (12:22 -0700)
Makefile
dns/name.py
dns/rdtypes/ANY/NSEC3.py
dns/rdtypes/IN/APL.py
pylintrc
tests/test_resolver.py

index 845abd3db23f1d7e3873232c9453ae26123df334..ca37045ad632d4b36c40c8854eed8475359cd2d2 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 2003-2007, 2009, 2011 Nominum, Inc.
+# Copyright (C) 2003-2017 Nominum, Inc.
 #
 # Permission to use, copy, modify, and distribute this software and its
 # documentation for any purpose with or without fee is hereby granted,
@@ -67,3 +67,6 @@ test3:
 
 lint:
        pylint dns tests examples/*.py
+
+lint3:
+       pylint3 dns tests examples/*.py
index 7537792e2698813d5abb4c8d24aa50652685058b..9c7e2713606902ce158cb090d9c42599861e23a4 100644 (file)
@@ -32,6 +32,7 @@ import dns.wiredata
 
 from ._compat import long, binary_type, text_type, unichr, maybe_decode
 
+# pylint: disable=sys-max-int
 try:
     maxint = sys.maxint
 except AttributeError:
index 9a15687bacd78f62c51503373f6bc129f13876a6..40564685fd48b5348db402514474289f01580d0a 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2004-2007, 2009-2011 Nominum, Inc.
+# Copyright (C) 2004-2017 Nominum, Inc.
 #
 # Permission to use, copy, modify, and distribute this software and its
 # documentation for any purpose with or without fee is hereby granted,
@@ -23,6 +23,8 @@ import dns.rdata
 import dns.rdatatype
 from dns._compat import xrange, text_type
 
+# pylint: disable=deprecated-string-function
+
 try:
     b32_hex_to_normal = string.maketrans('0123456789ABCDEFGHIJKLMNOPQRSTUV',
                                          'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567')
index ac9c1f02bfa50d65078d539b3d2a31eb67e0fc74..b4c0bfa0e0ae5483baff41e9eb8759dc8def8e88 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2003-2007, 2009-2011 Nominum, Inc.
+# Copyright (C) 2003-2017 Nominum, Inc.
 #
 # Permission to use, copy, modify, and distribute this software and its
 # documentation for any purpose with or without fee is hereby granted,
@@ -121,6 +121,10 @@ class APL(dns.rdata.Rdata):
 
     @classmethod
     def from_wire(cls, rdclass, rdtype, wire, current, rdlen, origin=None):
+
+        # pylint complains about this on Python 2.7, not sure why...
+        # pylint: disable=invalid-str-codec
+
         items = []
         while 1:
             if rdlen == 0:
index 8a8ec2a57d35cec726d55cfc4e61b0fe72fa96fc..bdb82db0f4844ea24f1e6edf494560f1c37570e8 100644 (file)
--- a/pylintrc
+++ b/pylintrc
@@ -12,7 +12,8 @@ enable=
     python3
 
 # It's worth looking at len-as-condition for optimization, but it's disabled
-# here as it is not a correctness thing.
+# here as it is not a correctness thing.  Similarly eq-without-hash is
+# probably worth improving.
 
 disable=
     R,
@@ -38,6 +39,7 @@ disable=
     wrong-import-order,
     wrong-import-position,
     len-as-condition,
+    eq-without-hash,
 
 [REPORTS]
 
index cf72f72296feea167b853c10b4fe34fcf783adc5..cd7b8c3edfe2e5a3af582e33383bf6795fd73aa1 100644 (file)
@@ -275,7 +275,7 @@ if hasattr(select, 'poll'):
 
 class NXDOMAINExceptionTestCase(unittest.TestCase):
 
-    # pylint: disable=broad-except
+    # pylint: disable=broad-except,exception-message-attribute
 
     def test_nxdomain_compatible(self):
         n1 = dns.name.Name(('a', 'b', ''))