dishka icon indicating copy to clipboard operation
dishka copied to clipboard

Switch WithParents to Annotated

Open Tapeline opened this issue 8 months ago • 0 comments

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

Tapeline avatar May 08 '25 20:05 Tapeline