Enhanced format inference in unified I/O interface#19960
Conversation
|
Thank you for your contribution to Astropy! 🌌 This checklist is meant to remind the package maintainers who will review this pull request of some common things to look for.
|
nstarman
left a comment
There was a problem hiding this comment.
I think something like this is a good idea! I'm on vacation this week so hopefully another maintainer can review.
|
@Iquecs2005 - thanks for the contribution! With a bit of time passing, I'm not so keen on my original idea to swallow exceptions. This could hide real bugs and in some cases cause even more confusion. But I think a middle ground that builds on your PR is possible. Instead of swallowing exceptions, just raise on the first one with an exception message that should help most users. I wanted to play around with this and came up with the following. The work you've put into testing should still be mostly applicable. |
Description
This pull request is to address the improvement of the unified I/O interface format inference, allowing for identifier functions to raise errors for better error clarity, grouped in an ExceptionGroup
IOIdentifierExceptions, and that doesn't trigger when a valid format is found.Fixes #18398