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

Switch Interface to use __init_subclass__ and module __getattr__ #91

Open
Jaymon opened this issue Mar 11, 2024 · 0 comments
Open

Switch Interface to use __init_subclass__ and module __getattr__ #91

Jaymon opened this issue Mar 11, 2024 · 0 comments

Comments

@Jaymon
Copy link
Owner

Jaymon commented Mar 11, 2024

Switch this to be similar to testdata. This would allow me to remove the Interface.inject methods and simplify the amount of startup pout needs until it's ready to go.

This would need two parts

  1. Add Interface.__init_subclass__ to record each of the Interface subclasses that get loaded into memory.
  2. Add pout.__init__.__getattr__ method that can use the Interface.instances that were recorded in __init_subclass__ and find the correct subclass to usefor the method that was called.

That should do it.

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