diff options
author | David Robillard <d@drobilla.net> | 2023-08-23 12:27:09 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-08-23 12:27:09 -0400 |
commit | 88a4334f8180c488ee7a14b301a9742cc751d908 (patch) | |
tree | 28dfb9a5fc328835f9b374d3cbd27e893418b0c4 /lv2specgen | |
parent | 5bb15b2b62fe1fe25028b29f1243757fdb8c7dbf (diff) | |
download | lv2-88a4334f8180c488ee7a14b301a9742cc751d908.tar.xz |
lv2specgen: Use isinstance() instead of comparing types
Diffstat (limited to 'lv2specgen')
-rwxr-xr-x | lv2specgen/lv2specgen.py | 6 |
1 files changed, 3 insertions, 3 deletions
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): |