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

Add a method to convert annotations to slots using metaclasses #13

Merged
merged 26 commits into from
May 28, 2024

Conversation

DavidCEllis
Copy link
Owner

  • Add AnnotationsSlotsMeta metaclass to create slots based on annotations.
  • Make Field subclasses no longer require @fieldclass
  • Delete @fieldclass
  • Convert @annotationclass decorator to AnnotationClass base class
    • This new base class supports __slots__ by default using the new metaclass.
  • Redefine prefab's Attribute class using annotations to demonstrate that slots are created.

@DavidCEllis DavidCEllis linked an issue May 19, 2024 that may be closed by this pull request
@DavidCEllis DavidCEllis changed the title Add a method to convert annotations to slots using metaclassses Add a method to convert annotations to slots using metaclasses May 20, 2024
@DavidCEllis
Copy link
Owner Author

Python 3.14 is likely to make annotations more of a pain to work with, it might be necessary to move annotations related code into a submodule.

@DavidCEllis DavidCEllis merged commit 5e63c4f into main May 28, 2024
8 checks passed
@DavidCEllis DavidCEllis deleted the metaclass_based_slots branch May 28, 2024 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Metaclass based Field and SlotBase classes
1 participant