Skip to content

Use __init_subclass__ instead of metaclass in time formats - #12115

Merged
taldcroft merged 1 commit into
astropy:mainfrom
mhvk:time-formats-use-init-subclass
Aug 25, 2021
Merged

taldcroft merged 1 commit into
astropy:mainfrom
mhvk:time-formats-use-init-subclass

Conversation

@mhvk

@mhvk mhvk commented Aug 24, 2021 •

Copy link
Copy Markdown
Contributor

#7144 happened to float on top when sorting by last-updated, and I saw that astropy.time was mentioned as a place where we could replace a metaclass with the somewhat more readable __init_subclass__ method. This seemed like a good idea and was indeed simple.

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.

  • Do the proposed changes actually accomplish desired goals?
  • Do the proposed changes follow the Astropy coding guidelines?
  • Are tests added/updated as required? If so, do they follow the Astropy testing guidelines?
  • Are docs added/updated as required? If so, do they follow the Astropy documentation guidelines?
  • Is rebase and/or squash necessary? If so, please provide the author with appropriate instructions. Also see "When to rebase and squash commits".
  • Did the CI pass? If no, are the failures related? If you need to run daily and weekly cron jobs as part of the PR, please apply the Extra CI label.
  • Is a change log needed? If yes, did the change log check pass? If no, add the no-changelog-entry-needed label. If this is a manual backport, use the skip-changelog-checks label unless special changelog handling is necessary.
  • Is a milestone set? Milestone must be set but astropy-bot check might be missing; do not let the green checkmark fool you.
  • At the time of adding the milestone, if the milestone set requires a backport to release branch(es), apply the appropriate backport-X.Y.x label(s) before merge.

@mhvk

mhvk commented Aug 25, 2021

Copy link
Copy Markdown
Contributor Author

Coverage failure is a red herring

@taldcroft taldcroft left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@taldcroft
taldcroft merged commit 2c0abaf into astropy:main Aug 25, 2021
@mhvk
mhvk deleted the time-formats-use-init-subclass branch August 25, 2021 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants