Skip to content

Commit

Permalink
Disable pylint check only in one line
Browse files Browse the repository at this point in the history
When the disable comment is in its own line, it will disable it for the
rest of the function.

Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
  • Loading branch information
llucax committed Jan 4, 2024
1 parent a810fef commit afe0ad3
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions tests/microgrid/test_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ async def test_grid_1(mocker: MockerFixture) -> None:
connections = {
Connection(1, 2),
}
# pylint: disable=protected-access
graph = gr._MicrogridComponentGraph(components=components, connections=connections)

graph = gr._MicrogridComponentGraph( # pylint: disable=protected-access
components=components, connections=connections
)

async with MockMicrogrid(graph=graph, mocker=mocker), AsyncExitStack() as stack:
grid = microgrid.grid()
Expand Down Expand Up @@ -70,8 +72,9 @@ async def test_grid_2(mocker: MockerFixture) -> None:
Connection(1, 2),
}

# pylint: disable=protected-access
graph = gr._MicrogridComponentGraph(components=components, connections=connections)
graph = gr._MicrogridComponentGraph( # pylint: disable=protected-access
components=components, connections=connections
)

async with MockMicrogrid(graph=graph, mocker=mocker), AsyncExitStack() as stack:
grid = microgrid.grid()
Expand All @@ -94,8 +97,9 @@ async def test_grid_3(mocker: MockerFixture) -> None:
Connection(1, 2),
}

# pylint: disable=protected-access
graph = gr._MicrogridComponentGraph(components=components, connections=connections)
graph = gr._MicrogridComponentGraph( # pylint: disable=protected-access
components=components, connections=connections
)

async with MockMicrogrid(graph=graph, mocker=mocker), AsyncExitStack() as stack:
grid = microgrid.grid()
Expand Down

0 comments on commit afe0ad3

Please sign in to comment.