summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile5
-rw-r--r--dns/name.py1
-rw-r--r--dns/rdtypes/ANY/NSEC3.py4
-rw-r--r--dns/rdtypes/IN/APL.py6
-rw-r--r--pylintrc4
-rw-r--r--tests/test_resolver.py2
6 files changed, 17 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 845abd3..ca37045 100644
--- 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
diff --git a/dns/name.py b/dns/name.py
index 7537792..9c7e271 100644
--- a/dns/name.py
+++ b/dns/name.py
@@ -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:
diff --git a/dns/rdtypes/ANY/NSEC3.py b/dns/rdtypes/ANY/NSEC3.py
index 9a15687..4056468 100644
--- a/dns/rdtypes/ANY/NSEC3.py
+++ b/dns/rdtypes/ANY/NSEC3.py
@@ -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')
diff --git a/dns/rdtypes/IN/APL.py b/dns/rdtypes/IN/APL.py
index ac9c1f0..b4c0bfa 100644
--- a/dns/rdtypes/IN/APL.py
+++ b/dns/rdtypes/IN/APL.py
@@ -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:
diff --git a/pylintrc b/pylintrc
index 8a8ec2a..bdb82db 100644
--- 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]
diff --git a/tests/test_resolver.py b/tests/test_resolver.py
index cf72f72..cd7b8c3 100644
--- a/tests/test_resolver.py
+++ b/tests/test_resolver.py
@@ -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', ''))