@slott56 yes, I'd love for that to be possible 😊
I've been trying to do something like this with TypeScript but doesn't seem to be possible there either
@slott56 yes, I'd love for that to be possible 😊
I've been trying to do something like this with TypeScript but doesn't seem to be possible there either
@patrick We used to call this "Uber Super Meta Programming." Not writing the application, but writing classes that make it easier to create the classes that implement the application.
It's not wrong, but it's so bafflingly indirect that it breaks the tools.
@slott56 mmh, maybe the design I have is bad, basically I'm writing a tool that supports plugins (which are Python classes), these plugins can be configurable (there's a base class that has the validation for the config.
I basically wanted to make sure that a plugin's configuration was properly typed without having to define the configuration type (since we are defining the configuration class already)
@slott56 Here's what I'm working with: https://github.com/autopub/autopub/pull/31/commits/58bb262c1b31f51887
@patrick This is often better done with a "registery"
@myregistery.PlugIn
class YourWhatever:
...
This lets the registery object vet the plug-in for all the required features.
Further. It can involve metaclass operations to inject features.