summaryrefslogtreecommitdiff
path: root/python/typelibrary.py
diff options
context:
space:
mode:
authorPeter LaFosse <peter@vector35.com>2021-08-24 16:34:35 -0400
committerPeter LaFosse <peter@vector35.com>2021-09-06 11:46:38 -0400
commite0841aa1bf02b5ed90aac8e4f2a0d8d4c58128f3 (patch)
tree77463e350882ea7cb66012384c2e96e3da215da4 /python/typelibrary.py
parent029b2e4508fdfe1b42a4e6ef9c90ace0de62d636 (diff)
Remove unnecessary check on type
Diffstat (limited to 'python/typelibrary.py')
-rw-r--r--python/typelibrary.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/python/typelibrary.py b/python/typelibrary.py
index e392557f..2d64b724 100644
--- a/python/typelibrary.py
+++ b/python/typelibrary.py
@@ -280,8 +280,7 @@ class TypeLibrary:
"""
if not isinstance(name, types.QualifiedName):
name = types.QualifiedName(name)
- if isinstance(type, types.MutableType):
- type = type.immutable_copy()
+ type = type.immutable_copy()
if not isinstance(type, types.Type):
raise ValueError("type must be a Type")
core.BNAddTypeLibraryNamedObject(self.handle, name._get_core_struct(), type.handle)
@@ -302,8 +301,7 @@ class TypeLibrary:
"""
if not isinstance(name, types.QualifiedName):
name = types.QualifiedName(name)
- if isinstance(type, types.MutableType):
- type = type.immutable_copy()
+ type = type.immutable_copy()
if not isinstance(type, types.Type):
raise ValueError("parameter type must be a Type")
core.BNAddTypeLibraryNamedType(self.handle, name._get_core_struct(), type.handle)