From: Bob Halley Date: Thu, 2 Apr 2020 15:45:04 +0000 (-0700) Subject: more delinting X-Git-Tag: v2.0.0rc1~313 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=77c0edb634b5de9ade6456eb1fe93e7e8bd1ed01;p=thirdparty%2Fdnspython.git more delinting --- diff --git a/dns/rdata.py b/dns/rdata.py index f207168c..136d92a9 100644 --- a/dns/rdata.py +++ b/dns/rdata.py @@ -94,15 +94,15 @@ def _constify(o): """ Convert mutable types to immutable types. """ - if type(o) == bytearray: + if isinstance(o, bytearray): return bytes(o) - if type(o) == tuple: + if isinstance(o, tuple): try: hash(o) return o except Exception: return tuple(_constify(elt) for elt in o) - if type(o) == list: + if isinstance(o, list): return tuple(_constify(elt) for elt in o) return o