Repository navigation
MetaData on dataclasses and default is None - #15237
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.
|
|
👋 Thank you for your draft pull request! Do you know that you can use |
|
changelog worthy? |
Not sure. If you only want to use this internally in this repo, then no. If you want enduser to use this as a standalone feature, then yes, but I thought |
|
Hmm. Better safe than sorry, I guess. 🤷 |
mhvk
left a comment
There was a problem hiding this comment.
Yes, looks good! Comments inline. I do think we should add a changelog entry, but maybe let that spell out that this class is mostly used internally,
The ``astropy.utils.metadata.MetaData`` class, which is used throughout astropy
to carry metadata on tables, columns, etc., can now also be used on dataclasses.
FWIW, I'd count this as a bug fix (but not one that needs to be backported, since we don't use it yet).
mhvk
left a comment
There was a problem hiding this comment.
This direction really seems fine to me. Just needs cleanup! I would comment where we now return None that we do this for dataclasses.
Signed-off-by: nstarman <[email protected]>
Signed-off-by: nstarman <[email protected]>
Signed-off-by: nstarman <[email protected]>
|
In a followup PR I'm going to add the |
mhvk
left a comment
There was a problem hiding this comment.
Looks good. I think a comment about returning None would still be useful, but it is by no means essential, so I'll approve now and let you decide.
Signed-off-by: nstarman <[email protected]>
|
Thanks @mhvk for the reviews and suggestions! It should auto-squash merge when CI passes. |
Partially replaces #15167