Skip to content

Commit aa93e54

Browse files
committed
Disable too-many-branches warning for _run method
Signed-off-by: Mathias L. Baumann <[email protected]>
1 parent 476c7f9 commit aa93e54

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/frequenz/dispatch/_bg_service.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ def start(self) -> None:
228228
"""Start the background service."""
229229
self._tasks.add(asyncio.create_task(self._run()))
230230

231-
async def _run(self) -> None:
231+
async def _run(self) -> None: # pylint: disable=too-many-branches
232232
"""Run the background service."""
233233
_logger.info(
234234
"Starting dispatching background service for microgrid %s",
@@ -471,9 +471,9 @@ async def _update_dispatch_schedule_and_notify(
471471

472472
# A new dispatch was created
473473
elif dispatch and not old_dispatch:
474-
assert not self._remove_scheduled(
475-
dispatch
476-
), "New dispatch already scheduled?!"
474+
assert not self._remove_scheduled(dispatch), (
475+
"New dispatch already scheduled?!"
476+
)
477477
# If its currently running, send notification right away
478478
if dispatch.started:
479479
await self._send_running_state_change(dispatch)

0 commit comments

Comments
 (0)