Skip to content

Commit 52b8380

Browse files
committed
Fix __aexit__ signature in mock_microgrid
Signed-off-by: Leandro Lucarella <[email protected]>
1 parent e468e9f commit 52b8380

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tests/timeseries/mock_microgrid.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import asyncio
99
from collections.abc import Callable
1010
from datetime import datetime, timedelta, timezone
11+
from types import TracebackType
1112
from typing import Coroutine
1213

1314
from frequenz.client.common.microgrid.components import ComponentId
@@ -622,6 +623,12 @@ async def __aenter__(self) -> MockMicrogrid:
622623
await self.start()
623624
return self
624625

625-
async def __aexit__(self, exc_type: None, exc_val: None, exc_tb: None) -> None:
626+
async def __aexit__(
627+
self,
628+
exc_type: type[BaseException] | None,
629+
exc_value: BaseException | None,
630+
traceback: TracebackType | None,
631+
/,
632+
) -> None:
626633
"""Exit context manager."""
627634
await self.cleanup()

0 commit comments

Comments
 (0)