Closed VRichardJP closed 10 months ago
Kia ora @VRichardJP. Great idea, thanks for suggesting! Working on it now 😎
This rabbit hole goes surprisingly deep. Thinking about how I'm going to add automated tests for this, I decided to bring in mypy, and it turned up lots of issues 🙈
This plus #14 is probably going to require a new major release version.
One typical use case for
ClassRegistry
is to implement a plugin architecture, in which all registered class implement a commonProtocol
or inherit from a commonABC
. To take your own example:Here all registered class are
Pokemon
, so what about aTypedClassRegistry
?In such case the current
ClassRegistry
is justTypedClassRegistry[Any]