File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,6 @@ def should_render(self: _OwnType, new: _OwnType) -> bool:
5151 """Whether the new component instance should be rendered."""
5252
5353
54- _Self = TypeVar ("_Self" )
5554_Render = TypeVar ("_Render" , covariant = True )
5655_Event = TypeVar ("_Event" , contravariant = True )
5756
@@ -66,11 +65,14 @@ async def render(self) -> _Render:
6665 async def deliver (self , event : _Event ) -> None :
6766 """Relay an event to its respective handler"""
6867
69- def __enter__ (self : _Self ) -> _Self :
68+ async def __aenter__ (self ) -> LayoutType [ _Render , _Event ] :
7069 """Prepare the layout for its first render"""
7170
72- def __exit__ (
73- self , exc_type : Type [Exception ], exc_value : Exception , traceback : TracebackType
71+ async def __aexit__ (
72+ self ,
73+ exc_type : Type [Exception ],
74+ exc_value : Exception ,
75+ traceback : TracebackType ,
7476 ) -> Optional [bool ]:
7577 """Clean up the view after its final render"""
7678
You can’t perform that action at this time.
0 commit comments