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

Issue Warning when a child of ez.Settings has a field named .settings #88

Open
cboulay opened this issue Feb 1, 2024 · 0 comments
Open

Comments

@cboulay
Copy link
Collaborator

cboulay commented Feb 1, 2024

With a recent change it is possible to shortcut using a settings constructor directly and instead provide settings' field values directly to the Component constructor, which then get passed on to the Component's SETTINGS object. However, this only works if there is no settings kwarg passed to the Component constructor. In effect, a Settings class with a .settings field can never have that field set by the above shortcut. Moreover, this would be a difficult error to detect and explain.

Thus, we should detect it pre-emptively and warn a user against their custom ez.Settings-derived class having a field named .settings.

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

No branches or pull requests

1 participant