Skip to content

Commit ca3d726

Browse files
committed
Fix wrong arguments in docstrings
Signed-off-by: Leandro Lucarella <[email protected]>
1 parent 18c5721 commit ca3d726

File tree

8 files changed

+20
-25
lines changed

8 files changed

+20
-25
lines changed

benchmarks/timeseries/periodic_feature_extractor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ def run_avg_np(
168168
The return value is discarded such that it can be used by timit.
169169
170170
Args:
171-
a: The array containing all data.
171+
array: The array containing all data.
172172
window_size: The size of the window.
173173
feature_extractor: An instance of the PeriodicFeatureExtractor.
174174
"""
@@ -185,7 +185,7 @@ def run_avg_py(
185185
The return value is discarded such that it can be used by timit.
186186
187187
Args:
188-
a: The array containing all data.
188+
array: The array containing all data.
189189
window_size: The size of the window.
190190
feature_extractor: An instance of the PeriodicFeatureExtractor.
191191
"""

tests/actor/power_distributing/test_distribution_algorithm.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ def battery_msg( # pylint: disable=too-many-arguments
5050
component_id: id of that component
5151
capacity: capacity
5252
soc: soc
53-
power_supply: supply bound
54-
power_consumption: consumption bound
53+
power: power bounds
5554
timestamp: timestamp of the message
5655
5756
Returns:
@@ -80,8 +79,7 @@ def inverter_msg(
8079
8180
Args:
8281
component_id: id of that component
83-
power_supply: Supply bound
84-
power_consumption: Consumption bound inverter
82+
power: Power bounds
8583
timestamp: Timestamp from the message
8684
8785
Returns:
@@ -109,9 +107,7 @@ def create_components(
109107
num: Number of components
110108
capacity: Capacity for each battery
111109
soc: SoC for each battery
112-
soc_bounds: SoC bounds for each battery
113-
supply_bounds: Supply bounds for each battery and inverter
114-
consumption_bounds: Consumption bounds for each battery and inverter
110+
power: Power bounds for each battery and inverter
115111
116112
Returns:
117113
List of the components

tests/actor/test_battery_pool_status.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ async def test_batteries_status(self, mocker: MockerFixture) -> None:
2828
BatteryStatusTracker is more tested in its own unit tests.
2929
3030
Args:
31-
mock_microgrid: mock microgrid client
31+
mocker: Pytest mocker fixture.
3232
"""
3333
mock_microgrid = MockMicrogrid(grid_meter=True)
3434
mock_microgrid.add_batteries(3)

tests/actor/test_battery_status.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ async def test_sync_update_status_with_messages(
155155
Otherwise we would have lots of async calls and waiting.
156156
157157
Args:
158-
mock_microgrid: mock_microgrid fixture
158+
mocker: Pytest mocker fixture.
159159
"""
160160
mock_microgrid = MockMicrogrid(grid_meter=True)
161161
mock_microgrid.add_batteries(3)
@@ -317,7 +317,7 @@ async def test_sync_blocking_feature(self, mocker: MockerFixture) -> None:
317317
Otherwise we would have lots of async calls and waiting.
318318
319319
Args:
320-
mock_microgrid: mock_microgrid fixture
320+
mocker: Pytest mocker fixture.
321321
"""
322322
mock_microgrid = MockMicrogrid(grid_meter=True)
323323
mock_microgrid.add_batteries(3)
@@ -434,7 +434,7 @@ async def test_sync_blocking_interrupted_with_with_max_data(
434434
Otherwise we would have lots of async calls and waiting.
435435
436436
Args:
437-
mock_microgrid: mock_microgrid fixture
437+
mocker: Pytest mocker fixture.
438438
"""
439439
mock_microgrid = MockMicrogrid(grid_meter=True)
440440
mock_microgrid.add_batteries(3)
@@ -485,7 +485,7 @@ async def test_sync_blocking_interrupted_with_invalid_message(
485485
Otherwise we would have lots of async calls and waiting.
486486
487487
Args:
488-
mock_microgrid: mock_microgrid fixture
488+
mocker: Pytest mocker fixture.
489489
"""
490490
mock_microgrid = MockMicrogrid(grid_meter=True)
491491
mock_microgrid.add_batteries(3)
@@ -545,8 +545,7 @@ async def test_timers(self, mocker: MockerFixture) -> None:
545545
Otherwise we would have lots of async calls and waiting.
546546
547547
Args:
548-
mock_microgrid: mock_microgrid fixture
549-
mocker: pytest mocker instance
548+
mocker: Pytest mocker fixture.
550549
"""
551550
mock_microgrid = MockMicrogrid(grid_meter=True)
552551
mock_microgrid.add_batteries(3)
@@ -608,7 +607,7 @@ async def test_async_battery_status(self, mocker: MockerFixture) -> None:
608607
"""Test if status changes.
609608
610609
Args:
611-
mock_microgrid: mock_microgrid fixture
610+
mocker: Pytest mocker fixture.
612611
"""
613612
mock_microgrid = MockMicrogrid(grid_meter=True)
614613
mock_microgrid.add_batteries(3)

tests/timeseries/_battery_pool/test_battery_pool.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ async def test_battery_pool_capacity(setup_batteries_pool: SetupArgs) -> None:
301301
"""Test capacity metric for battery pool with subset of components in the microgrid.
302302
303303
Args:
304-
setup_all_batteries: Fixture that creates needed microgrid tools.
304+
setup_batteries_pool: Fixture that creates needed microgrid tools.
305305
"""
306306
await run_capacity_test(setup_batteries_pool)
307307

@@ -319,7 +319,7 @@ async def test_battery_pool_soc(setup_batteries_pool: SetupArgs) -> None:
319319
"""Test soc metric for battery pool with subset of components in the microgrid.
320320
321321
Args:
322-
setup_all_batteries: Fixture that creates needed microgrid tools.
322+
setup_batteries_pool: Fixture that creates needed microgrid tools.
323323
"""
324324
await run_soc_test(setup_batteries_pool)
325325

@@ -337,7 +337,7 @@ async def test_battery_pool_power_bounds(setup_batteries_pool: SetupArgs) -> Non
337337
"""Test power bounds metric for battery pool with subset of components in the microgrid.
338338
339339
Args:
340-
setup_all_batteries: Fixture that creates needed microgrid tools.
340+
setup_batteries_pool: Fixture that creates needed microgrid tools.
341341
"""
342342
await run_power_bounds_test(setup_batteries_pool)
343343

@@ -355,7 +355,7 @@ async def test_battery_pool_temperature(setup_batteries_pool: SetupArgs) -> None
355355
"""Test temperature for battery pool with subset of components in the microgrid.
356356
357357
Args:
358-
setup_all_batteries: Fixture that creates needed microgrid tools.
358+
setup_batteries_pool: Fixture that creates needed microgrid tools.
359359
"""
360360
await run_temperature_test(setup_batteries_pool)
361361

tests/timeseries/mock_microgrid.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ async def send_battery_data(self, socs: list[float]) -> None:
465465
"""Send raw battery data from the mock microgrid.
466466
467467
Args:
468-
values: list of soc values for each battery.
468+
socs: list of soc values for each battery.
469469
"""
470470
assert len(socs) == len(self.battery_ids)
471471
timestamp = datetime.now(tz=timezone.utc)

tests/utils/graph_generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ def _to_graph(
186186
187187
Args:
188188
parent: the parent component.
189-
components: the components to convert to a graph.
189+
children: the children components.
190190
191191
Returns:
192192
a tuple containing the components and connections of the graph.

tests/utils/mock_microgrid_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,9 +229,9 @@ def _create_mock_api(
229229
"""Create mock of MicrogridApiClient.
230230
231231
Args:
232-
bat_channel: battery channels to be returned from
232+
bat_channels: battery channels to be returned from
233233
MicrogridApiClient.battery_data.
234-
inv_channel: inverter channels to be returned from
234+
inv_channels: inverter channels to be returned from
235235
MicrogridApiClient.inverter_data.
236236
meter_channels: meter channels to be returned from
237237
MicrogridApiClient.meter_data.

0 commit comments

Comments
 (0)