]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
Pylint: reduce range of pylint disable statement
authorMartin <martin.basti@gmail.com>
Fri, 14 Jul 2017 18:17:23 +0000 (20:17 +0200)
committerMartin <martin.basti@gmail.com>
Fri, 14 Jul 2017 21:02:06 +0000 (23:02 +0200)
If pylint disable statement is used on separate line, it disables the
check to the end of module. In that case real errors may be unnoticed.

Pylint disable statement can be used per block and per line

dns/name.py
dns/rdtypes/ANY/NSEC3.py

index 9c7e2713606902ce158cb090d9c42599861e23a4..9764de5e78d771e07474530cab2f3c367f33bf9b 100644 (file)
@@ -32,9 +32,8 @@ import dns.wiredata
 
 from ._compat import long, binary_type, text_type, unichr, maybe_decode
 
-# pylint: disable=sys-max-int
 try:
-    maxint = sys.maxint
+    maxint = sys.maxint  # pylint: disable=sys-max-int
 except AttributeError:
     maxint = (1 << (8 * struct.calcsize("P"))) // 2 - 1
 
index 40564685fd48b5348db402514474289f01580d0a..2e722de2a4965417cfd40395e19cd3e7a2465f96 100644 (file)
@@ -24,7 +24,6 @@ import dns.rdatatype
 from dns._compat import xrange, text_type
 
 # pylint: disable=deprecated-string-function
-
 try:
     b32_hex_to_normal = string.maketrans('0123456789ABCDEFGHIJKLMNOPQRSTUV',
                                          'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567')
@@ -35,6 +34,7 @@ except AttributeError:
                                         b'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567')
     b32_normal_to_hex = bytes.maketrans(b'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567',
                                         b'0123456789ABCDEFGHIJKLMNOPQRSTUV')
+# pylint: enable=deprecated-string-function
 
 # hash algorithm constants
 SHA1 = 1