diff --git a/openpluginloader/defaultstrategy.py b/openpluginloader/defaultstrategy.py index 5749e26..6c096f2 100644 --- a/openpluginloader/defaultstrategy.py +++ b/openpluginloader/defaultstrategy.py @@ -491,7 +491,7 @@ def find_spec(self, fullname: str, path, target=None) -> ModuleSpec | None: corrosponding_plugin = plugin if corrosponding_plugin is None: - return None + raise ImportError(f"Could not locate plugin: {plugin_name}.") # Use plugin entry when trying to import `__ENTRY__` if len(fullname_parts) >= 3 and fullname_parts[2] == "__ENTRY__": diff --git a/pyproject.toml b/pyproject.toml index 5e42b14..7615b09 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "openpluginloader" -version = "1.0.4" +version = "1.0.5" description = "A plugin loader library meant for wide use and quick adoption." readme = "README.md" requires-python = ">=3.13" diff --git a/uv.lock b/uv.lock index 532311e..5ad16e8 100644 --- a/uv.lock +++ b/uv.lock @@ -233,7 +233,7 @@ wheels = [ [[package]] name = "openpluginloader" -version = "1.0.3" +version = "1.0.5" source = { editable = "." } dependencies = [ { name = "packaging" },