summaryrefslogtreecommitdiff
path: root/dns
diff options
context:
space:
mode:
authorBob Halley <halley@dnspython.org>2020-08-11 07:42:07 -0700
committerBob Halley <halley@dnspython.org>2020-08-11 07:42:07 -0700
commit8e7f887a6d482c61b3c745f34c02fcbf07faaaf7 (patch)
tree02a32f4648dd8315027b5cf6181cea1272a05f8d /dns
parentca553435093b0dfae0eefc8d634529fe61ac8721 (diff)
downloaddnspython-8e7f887a6d482c61b3c745f34c02fcbf07faaaf7.tar.gz
lint
Diffstat (limited to 'dns')
-rw-r--r--dns/immutable.py3
-rw-r--r--dns/versioned.py2
2 files changed, 3 insertions, 2 deletions
diff --git a/dns/immutable.py b/dns/immutable.py
index 7cc39dd..db7abbc 100644
--- a/dns/immutable.py
+++ b/dns/immutable.py
@@ -32,12 +32,13 @@ class Dict(collections.abc.Mapping):
def __getitem__(self, key):
return self._odict.__getitem__(key)
- def __hash__(self):
+ def __hash__(self): # pylint: disable=invalid-hash-returned
if self._hash is None:
h = 0
for key in sorted(self._odict.keys()):
h ^= hash(key)
object.__setattr__(self, '_hash', h)
+ # this does return an int, but pylint doesn't figure that out
return self._hash
def __len__(self):
diff --git a/dns/versioned.py b/dns/versioned.py
index 45ede79..cc2f714 100644
--- a/dns/versioned.py
+++ b/dns/versioned.py
@@ -201,7 +201,7 @@ class Zone(dns.zone.Zone):
self._write_waiters = collections.deque()
self._commit_version_unlocked(WritableVersion(self), origin)
- def reader(self, id=None, serial=None):
+ def reader(self, id=None, serial=None): # pylint: disable=arguments-differ
if id is not None and serial is not None:
raise ValueError('cannot specify both id and serial')
with self.version_lock: