diff --git a/src/python/jw/pkg/lib/App.py b/src/python/jw/pkg/lib/App.py index 52cd4f15..a298c1cf 100644 --- a/src/python/jw/pkg/lib/App.py +++ b/src/python/jw/pkg/lib/App.py @@ -222,8 +222,8 @@ class App: # export self.__eloop.close() self.__eloop = None - async def __aenter__(self) -> None: - pass + async def __aenter__(self) -> App: + return self async def __aexit__( self, @@ -231,7 +231,7 @@ class App: # export exc: BaseException | None, tb: types.TracebackType | None, ) -> None: - pass + self.close() async def __run(self, argv: list[str] | None = None) -> None: