aboutsummaryrefslogtreecommitdiffstats
path: root/lv2specgen/lv2docgen.py
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-06-16 14:30:06 -0400
committerDavid Robillard <d@drobilla.net>2022-07-17 17:08:38 -0400
commit86835a05f5e4d4ca7e016e29210cd613af0ea2ce (patch)
treee0f4659b7a519271ae55b8c1bde08d6cb12e7ad8 /lv2specgen/lv2docgen.py
parent85e480aa08aef7d20617bd084e8a61b745e0aed6 (diff)
downloadlv2-86835a05f5e4d4ca7e016e29210cd613af0ea2ce.tar.xz
Clean up and modernize Python support code
Switches to safer and more modern idioms, and addresses many issues raised by flake8 and pylint.
Diffstat (limited to 'lv2specgen/lv2docgen.py')
-rwxr-xr-xlv2specgen/lv2docgen.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lv2specgen/lv2docgen.py b/lv2specgen/lv2docgen.py
index 35237b3..c5e13a7 100755
--- a/lv2specgen/lv2docgen.py
+++ b/lv2specgen/lv2docgen.py
@@ -38,7 +38,8 @@ rdfs = rdflib.Namespace("http://www.w3.org/2000/01/rdf-schema#")
def uri_to_path(uri):
- path = uri[uri.find(":") :]
+ first_colon = uri.find(":")
+ path = uri[first_colon:]
while not path[0].isalpha():
path = path[1:]
return path