From ba89b3894fac5a3f783afc59818796a19514dfe1 Mon Sep 17 00:00:00 2001 From: Zerotistic <54184933+Zerotistic@users.noreply.github.com> Date: Wed, 30 Oct 2024 23:03:19 +0100 Subject: Use idiomatic Python --- python/typelibrary.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'python/typelibrary.py') diff --git a/python/typelibrary.py b/python/typelibrary.py index 232cd6a0..2796d0f1 100644 --- a/python/typelibrary.py +++ b/python/typelibrary.py @@ -183,7 +183,7 @@ class TypeLibrary: def add_alternate_name(self, name: str) -> None: """Adds an extra name to this type library used during library lookups and dependency resolution""" - if type(name) != str: + if not isinstance(name, str): raise ValueError(f"Expected name to be str, got {type(name)}") core.BNAddTypeLibraryAlternateName(self.handle, name) -- cgit v1.3.1