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

Remove support for inner Meta class #433

Merged
merged 2 commits into from
Jun 8, 2024

Conversation

subhashb
Copy link
Contributor

@subhashb subhashb commented Jun 8, 2024

This commit removes support for inner Meta class to define options. With this change:

  1. All domain elements have to be registered with their respective decorators
  2. Elements can be optionally declared and registered separately, passing the options to the domain.register method
  3. Subclassing does not inherit Meta options
  4. Element options will only be valid after registering with domain
  5. Base classes will throw NotSupportedError on instantiation, instead of TypeError.

This commit removes support for inner `Meta` class to define options.
With this change:
1. All domain elements have to be registered with their respective decorators
2. Elements can be optionally declared and registered separately, passing the
options to the `domain.register` method
3. Subclassing does not inherit Meta options
4. Element options will only be valid after registering with domain
5. Base classes will throw `NotSupportedError` on instantiation, instead of
`TypeError`.
@subhashb subhashb self-assigned this Jun 8, 2024
@subhashb subhashb merged commit d7a8d73 into main Jun 8, 2024
4 checks passed
@subhashb subhashb deleted the remove-support-for-Meta-inner-class branch June 8, 2024 22:33
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.

1 participant