Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use full
plugin_name
when finding chosen reader
rather than `star…
…tswith` (#297) Prior to this PR, the wrong plugin might be chosen when multiple compatible readers are available with similar names, and the user chose to use a plugin with a shorter name. As a concrete example, if a user chose explicitly to read a file with `napari`, but a plugin with a longer name that starts with `napari` was also compatible, e.g. `napari-tifffile`, the user's choice **may** have been ignored, depending on which plugin came up first in the comparison. To avoid this, this PR changes the comparison from `rdr.command.startswith` to strict comparison on `rdr.plugin_name`. I've added a test that always passes in this branch, and only sometimes passes on `main` (😬) but I'm not sure if it's worth keeping it or if we are all just happy to accept the logic 🤷♀️ --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Juan Nunez-Iglesias <jni@fastmail.com>
- Loading branch information