Skip to content

Commit

Permalink
fix: plugin info for plugins with '-'
Browse files Browse the repository at this point in the history
Should fix #69, might still be broken for Python packages that don't
with 'kiara_plugin.', but I think we can ignore that for now.
  • Loading branch information
makkus committed Feb 6, 2024
1 parent 73add66 commit c28d68f
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/kiara/interfaces/python_api/models/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -1779,10 +1779,13 @@ def create_from_instance(
pkg_name = pkg.name
if pkg_name == instance:
match = pkg.name
elif pkg_name.replace("kiara-plugin", "kiara_plugin") == instance:
match = pkg.name
elif pkg_name.replace("kiara_plugin", "kiara-plugin") == instance:
match = pkg.name
elif pkg_name.startswith("kiara-plugin") or pkg_name.startswith(
"kiara_plugin"
):
underscored = pkg_name.replace("-", "_")
if underscored == instance:
match = underscored
break

if not match:
raise KiaraException(
Expand Down

0 comments on commit c28d68f

Please sign in to comment.