ContainerProtocol.register returns self
Y'all may have a reason for not defining the return type of ContainerProtocol.register, but if so, I didn't pick up on it.
Here I propose making ContainerProtocol.register return Self. This matches what Container.register does and allows a chaining of registrations of like
container.register(...).register(...).register(...)
Honestly, I don't care and am equally happy with None, but a tighter bound than Any seems beneficial to maintaining portability across container implementations.
Hi @tdg5
Sorry for replying so late. The reason why I didn't specify return self in the ContainerProtocol is only to keep simple the protocol that can be used to replace rodi with alternative implementations of DI in applications like BlackSheep apps.
But I like your idea and I am considering to merge. Thank You!