Fix regression introduced by pyright
Committed e136e5
--- a/gmpg/_pkg/licensing/__init__.py
+++ b/gmpg/_pkg/licensing/__init__.py
abbreviation = "".join(w[0] for w in name.split() if w not in {"of"}).lower()
if req_name.lower().strip() not in (name.lower(), abbreviation):
continue
+ version, details = None, {}
for version, details in sorted(versions.items(), key=cmp):
if version == req_version:
break
- else:
- continue
if req_version and version != req_version:
err_msg = "unknown version `{}` for `{}`"
raise KeyError(err_msg.format(req_version, name))