]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
more delinting
authorBob Halley <halley@dnspython.org>
Thu, 2 Apr 2020 15:45:04 +0000 (08:45 -0700)
committerBob Halley <halley@dnspython.org>
Thu, 2 Apr 2020 15:45:04 +0000 (08:45 -0700)
dns/rdata.py

index f207168cfe72f2a064f7de57b772b52f5d10cf22..136d92a93e5fde3142925fecc317d71391a82d3c 100644 (file)
@@ -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