dishka
dishka copied to clipboard
Switch WithParents to Annotated
According to Tishka17's proposal, we should change the way WithParents annotation behaves. It should now be based on Annotated so that the run-time and type-checking-time behaviours don't vary. In that case we won't need if TYPE_CHECKING on WithParents definition anymore.
Possible implementation
WithParents now will be Annotated[T, WithParentsMarker()]. The code regarding components should be tested so that it doesn't treat WithParentsMarker as component name and tweaked to behave this way if needed. The code regarding WithParents shall be changed so now it looks for Annotated with this particular marker.
Please, assign this issue to me.
Upd: deferred for an indefinite period