Type-hints for any API which accepts a dependency binding defines it as "Type[T]" when in fact this can be a non-type value that is simply Hashable. Taken from docs:
It is possible to use any hashable object as a binding key.
I confirmed that my IDE understands that when you pass a non-type, it falls to "Hashable" and drops away type-hints from there. As it stands, I suspect that if you try to use Hashable values in conjunction with a Python type-checker, then the checker would give failures when it should be allowed.
Type-hints for any API which accepts a dependency binding defines it as "Type[T]" when in fact this can be a non-type value that is simply Hashable. Taken from docs:
Here is my suggested alternative:
I confirmed that my IDE understands that when you pass a non-type, it falls to "Hashable" and drops away type-hints from there. As it stands, I suspect that if you try to use Hashable values in conjunction with a Python type-checker, then the checker would give failures when it should be allowed.