fix context managers

This commit is contained in:
HgO 2022-07-08 22:38:51 +02:00
parent eda0dc8193
commit d8ab7c1d9b
2 changed files with 4 additions and 4 deletions

View file

@ -22,8 +22,8 @@ class AlertmanagerClient(AsyncContextManager):
self.cache = cache
self.session = aiohttp.ClientSession()
def __aenter__(self) -> AlertmanagerClient:
return self
async def __aenter__(self) -> AlertmanagerClient:
return await self
async def __aexit__(self, *args: Any, **kwargs: Any) -> None:
await super().__aexit__(*args, **kwargs)

View file

@ -65,8 +65,8 @@ class Webhook(AsyncContextManager):
self.port = config.port
self.socket = config.socket
def __aenter__(self) -> Webhook:
return self
async def __aenter__(self) -> Webhook:
return await self
async def __aexit__(self, *args: Any, **kwargs: Any) -> None:
await super().__aexit__(*args, **kwargs)