Skip to content

Commit 17c17d5

Browse files
committed
Disable pylint check only in one line
When the disable comment is in its own line, it will disable it for the rest of the function. Signed-off-by: Leandro Lucarella <[email protected]>
1 parent b9d88c8 commit 17c17d5

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

tests/microgrid/test_grid.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,10 @@ async def test_grid_1(mocker: MockerFixture) -> None:
3636
connections = {
3737
Connection(1, 2),
3838
}
39-
# pylint: disable=protected-access
40-
graph = gr._MicrogridComponentGraph(components=components, connections=connections)
39+
40+
graph = gr._MicrogridComponentGraph( # pylint: disable=protected-access
41+
components=components, connections=connections
42+
)
4143

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

73-
# pylint: disable=protected-access
74-
graph = gr._MicrogridComponentGraph(components=components, connections=connections)
75+
graph = gr._MicrogridComponentGraph( # pylint: disable=protected-access
76+
components=components, connections=connections
77+
)
7578

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

97-
# pylint: disable=protected-access
98-
graph = gr._MicrogridComponentGraph(components=components, connections=connections)
100+
graph = gr._MicrogridComponentGraph( # pylint: disable=protected-access
101+
components=components, connections=connections
102+
)
99103

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

0 commit comments

Comments
 (0)