Skip to content

Commit c2702e2

Browse files
committed
Use better name for connection manager singleton instance
Signed-off-by: Leandro Lucarella <[email protected]>
1 parent 25929bf commit c2702e2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/frequenz/sdk/microgrid/connection_manager.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def api_client(self) -> MicrogridApiClient:
4646
"""Get the MicrogridApiClient.
4747
4848
Returns:
49-
api client
49+
The microgrid API client used by this connection manager.
5050
"""
5151

5252
@property
@@ -181,14 +181,14 @@ async def initialize(server_url: str) -> None:
181181

182182
_logger.info("Connecting to microgrid at %s", server_url)
183183

184-
microgrid_api = _InsecureConnectionManager(server_url)
185-
await microgrid_api._initialize() # pylint: disable=protected-access
184+
connection_manager = _InsecureConnectionManager(server_url)
185+
await connection_manager._initialize() # pylint: disable=protected-access
186186

187187
# Check again that _MICROGRID_API is None in case somebody had the great idea of
188188
# calling initialize() twice and in parallel.
189189
assert _CONNECTION_MANAGER is None, "MicrogridApi was already initialized."
190190

191-
_CONNECTION_MANAGER = microgrid_api
191+
_CONNECTION_MANAGER = connection_manager
192192

193193

194194
def get() -> ConnectionManager:

0 commit comments

Comments
 (0)