Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reimplement dataaccessor #66

Merged
merged 10 commits into from
Aug 16, 2024
Merged

Reimplement dataaccessor #66

merged 10 commits into from
Aug 16, 2024

Commits on Aug 15, 2024

  1. Configuration menu
    Copy the full SHA
    1af7698 View commit details
    Browse the repository at this point in the history
  2. Fixing #53. Following advice from @suvayu: class DataAccessor(object,…

    … metaclass=RequiredAttributesMetaclass), i.e. DataAccessor inheriting from RequiredAttributesMetaclass is an overkill, since RequiredAttributesMetaclass does nothing more than checking for required attributes. requiredatts.py can be removed and DataAccessor can be turned into a dataclass, which will have the required arguments declared.
    HannoSpreeuw committed Aug 15, 2024
    Configuration menu
    Copy the full SHA
    7e58d00 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    fef1a47 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d11e570 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    c336732 View commit details
    Browse the repository at this point in the history
  6. Same line of reasoning as for commit 7e58d00: the enforcement of requ…

    …ired attributes is much simpler achieved by defining a Python dataclass instead of inheriting from a metaclass.
    HannoSpreeuw committed Aug 15, 2024
    Configuration menu
    Copy the full SHA
    5a8da91 View commit details
    Browse the repository at this point in the history
  7. Shortening of super(class, self).__init__ but requires Python >=3.10.…

    … Third commit of this sort.
    HannoSpreeuw committed Aug 15, 2024
    Configuration menu
    Copy the full SHA
    179e765 View commit details
    Browse the repository at this point in the history
  8. Apparently, you shouldn't do super(FitsImage, self).__init__() if the…

    … parent class of FitsImage is a dataclass. In this case that will yield: TypeError: DataAccessor.__init__() missing 11 required positional arguments:....
    HannoSpreeuw committed Aug 15, 2024
    Configuration menu
    Copy the full SHA
    a7fa56d View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    51d5323 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    d163f9b View commit details
    Browse the repository at this point in the history