From 88a4334f8180c488ee7a14b301a9742cc751d908 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 23 Aug 2023 12:27:09 -0400 Subject: lv2specgen: Use isinstance() instead of comparing types --- lv2specgen/lv2specgen.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lv2specgen/lv2specgen.py') diff --git a/lv2specgen/lv2specgen.py b/lv2specgen/lv2specgen.py index aa166a7..d6e86f8 100755 --- a/lv2specgen/lv2specgen.py +++ b/lv2specgen/lv2specgen.py @@ -111,15 +111,15 @@ def getLiteralString(s): def isResource(n): - return type(n) == rdflib.URIRef + return isinstance(n, rdflib.URIRef) def isBlank(n): - return type(n) == rdflib.BNode + return isinstance(n, rdflib.BNode) def isLiteral(n): - return type(n) == rdflib.Literal + return isinstance(n, rdflib.Literal) def niceName(uri): -- cgit v1.2.1