File tree 1 file changed +6
-4
lines changed
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:
51
51
"""Whether the new component instance should be rendered."""
52
52
53
53
54
- _Self = TypeVar ("_Self" )
55
54
_Render = TypeVar ("_Render" , covariant = True )
56
55
_Event = TypeVar ("_Event" , contravariant = True )
57
56
@@ -66,11 +65,14 @@ async def render(self) -> _Render:
66
65
async def deliver (self , event : _Event ) -> None :
67
66
"""Relay an event to its respective handler"""
68
67
69
- def __enter__ (self : _Self ) -> _Self :
68
+ async def __aenter__ (self ) -> LayoutType [ _Render , _Event ] :
70
69
"""Prepare the layout for its first render"""
71
70
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 ,
74
76
) -> Optional [bool ]:
75
77
"""Clean up the view after its final render"""
76
78
You can’t perform that action at this time.
0 commit comments