-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add check for passed reader contribution (#301)
Following the report [here](https://napari.zulipchat.com/#narrow/stream/212875-general/topic/reader.20plugin.20issue.20with.200.2E4.2E18) , this PR updates the `_read` function to check if a specific reader contribution of the form `plugin_name.reader_contribution` was passed as `plugin_name`. This worked before #297 (though it was **not** part of the intended public API), but will not work with `npe2>0.7.0` without this change. Note that this PR does not throw a specific error if the given plugin doesn't exist - we can add a check for that but it's actually non-trivial since the only public reader method atm is `iter_compatible_readers`. We arguably should never be passing a non-existent plugin this level deep so maybe that's ok. No doubt `napari` tests will now fail, but I will go and make those updates separately... cc @Czaki @psobolewskiPhD --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Ashley Anderson <aganders3@gmail.com> Co-authored-by: Nathan Clack <nclack@chanzuckerberg.com> Co-authored-by: Nathan Clack <nclack@gmail.com> Co-authored-by: Juan Nunez-Iglesias <jni@fastmail.com>
- Loading branch information
1 parent
5199738
commit a63112c
Showing
2 changed files
with
193 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters