Conversation
9ce89ca to
e97ac86
Compare
mhvk
left a comment
There was a problem hiding this comment.
It makes a lot of sense to me to allow writers to return something (almost always None anyway), though I wonder whether there should not be a minimal test (and docs?), even though obviously you will use it in future PRs... Maybe one case where splitting it off is not the right way? Ping @taldcroft
|
My question is just about consistency and the possibility that different writers return different content results. What's the planned use case? |
Sure thing. I'll slap a changelog on there too.
I guess that's a possibility. But can't readers return different content results? Obviously that would be funny if a Table reader returned a SkyCoord... but it could.
For me, the object transformations I discuss in the Cosmology IO PR: But more generally, writers might return memory addresses, status reports, etc. |
In general a unified I/O reader needs to return a subclass of the calling class. |
|
Anyway, this idea seems fine. |
Signed-off-by: Nathaniel Starkman (@nstarman) <nstarkman@protonmail.com>
e97ac86 to
20c3509
Compare
mhvk
left a comment
There was a problem hiding this comment.
Looks all OK except I think it would be nice to make the changelog entry a little more descriptive. (Alternatively, I'm also fine to not have a changelog entry, since this is no API change from the user perspective for anything currently in astropy!)
|
Failing check is unrelated (#11918). Since @taldcroft agreed with the idea, let's get this in! |
This shouldn't change anything for existing writers, but allows for registered write methods to return something, if they so choose.
Signed-off-by: Nathaniel Starkman (@nstarman) nstarkman@protonmail.com
Checklist for package maintainer(s)
This checklist is meant to remind the package maintainer(s) who will
review this pull request of some common things to look for. This list
is not exhaustive.
Extra CIlabel.no-changelog-entry-neededlabel.astropy-botcheck might be missing; do not let the green checkmark fool you.backport-X.Y.xlabel(s) before merge.