Skip to content

Commit 9b54403

Browse files
committed
Don't leave an empty line between docstrings and code
Signed-off-by: Leandro Lucarella <[email protected]>
1 parent 2f3eae1 commit 9b54403

File tree

10 files changed

+0
-16
lines changed

10 files changed

+0
-16
lines changed

tests/actor/power_distributing/test_distribution_algorithm.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ def create_components_with_capacity(
129129
self, num: int, capacity: List[float]
130130
) -> List[InvBatPair]:
131131
"""Create components with given capacity."""
132-
133132
components: List[InvBatPair] = []
134133
for i in range(0, num):
135134
battery_data = BatteryDataWrapper(

tests/actor/test_battery_status.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ def battery_data( # pylint: disable=too-many-arguments
6464
Returns:
6565
BatteryData with given arguments.
6666
"""
67-
6867
return BatteryDataWrapper(
6968
component_id=component_id,
7069
capacity=capacity,
@@ -98,7 +97,6 @@ def inverter_data(
9897
Returns:
9998
InverterData with given arguments.
10099
"""
101-
102100
return InverterDataWrapper(
103101
component_id=component_id,
104102
timestamp=datetime.now(tz=timezone.utc) if timestamp is None else timestamp,
@@ -887,7 +885,6 @@ async def test_critical_error(
887885
setup_tracker: tuple[MockMicrogrid, Receiver[Status]],
888886
) -> None:
889887
"""Test recovery after critical error."""
890-
891888
mock_microgrid, status_receiver = setup_tracker
892889

893890
await self._send_healthy_inverter(mock_microgrid)

tests/actor/test_resampling.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ async def test_single_request(
115115
fake_time: time_machine.Coordinates,
116116
) -> None:
117117
"""Run main functions that initializes and creates everything."""
118-
119118
channel_registry = ChannelRegistry(name="test")
120119
data_source_req_chan = Broadcast[ComponentMetricRequest]("data-source-req")
121120
data_source_req_recv = data_source_req_chan.new_receiver()
@@ -159,7 +158,6 @@ async def test_duplicate_request(
159158
fake_time: time_machine.Coordinates,
160159
) -> None:
161160
"""Run main functions that initializes and creates everything."""
162-
163161
channel_registry = ChannelRegistry(name="test")
164162
data_source_req_chan = Broadcast[ComponentMetricRequest]("data-source-req")
165163
data_source_req_recv = data_source_req_chan.new_receiver()

tests/actor/test_run_utils.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ async def _run(self) -> None:
7777
# pylint: disable=redefined-outer-name
7878
async def test_all_actors_done(fake_time: time_machine.Coordinates) -> None:
7979
"""Test the completion of all actors."""
80-
8180
sleepy_actor_1 = SleepyActor("sleepy_actor_1", sleep_duration=1.0)
8281
sleepy_actor_2 = SleepyActor("sleepy_actor_2", sleep_duration=2.0)
8382

@@ -110,7 +109,6 @@ async def test_all_actors_done(fake_time: time_machine.Coordinates) -> None:
110109

111110
async def test_actors_cancelled() -> None:
112111
"""Test the completion of actors being cancelled."""
113-
114112
faulty_actors = [FaultyActor(f"faulty_actor_{idx}") for idx in range(5)]
115113

116114
await asyncio.wait_for(run(*faulty_actors), timeout=1.0)

tests/config/test_config.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ def test_get_as_success(
117117
self, key: str, expected_type: Any, value: Any, conf_vars: dict[str, Any]
118118
) -> None:
119119
"""Test get_as function with proper arguments."""
120-
121120
config = Config(conf_vars=conf_vars)
122121
result = config.get_as(key, expected_type)
123122
assert result == value
@@ -162,7 +161,6 @@ def test_get_dict_values_success(
162161
conf_vars: dict[str, Any],
163162
) -> None:
164163
"""Test get_as function with proper arguments."""
165-
166164
config = Config(conf_vars=conf_vars)
167165
result = config.get_dict(key_prefix, expected_values_type)
168166
assert result == value
@@ -179,7 +177,6 @@ def test_get_dict_success(
179177
self, key_prefix: str, expected_values_type: Any, conf_vars: dict[str, Any]
180178
) -> None:
181179
"""Test get_as function with proper arguments."""
182-
183180
config = Config(conf_vars=conf_vars)
184181

185182
err_msg_re = (

tests/microgrid/test_datapipeline.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ def event_loop() -> Iterator[async_solipsism.EventLoop]:
3030

3131
async def test_actors_started(mocker: MockerFixture) -> None:
3232
"""Test that the datasourcing, resampling and power distributing actors are started."""
33-
3433
datapipeline = _DataPipeline(
3534
resampler_config=ResamplerConfig(resampling_period=timedelta(seconds=1))
3635
)

tests/microgrid/test_grid.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
async def test_grid() -> None:
1616
"""Test the grid connection module."""
17-
1817
# The tests here need to be in this exact sequence, because the grid connection
1918
# is a singleton. Once it gets created, it stays in memory for the duration of
2019
# the tests, unless we explicitly delete it.

tests/microgrid/test_microgrid_api.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,6 @@ async def test_connection_manager_another_method(
165165
components: components
166166
connections: connections
167167
"""
168-
169168
microgrid_client = MagicMock()
170169
microgrid_client.components = AsyncMock(return_value=[])
171170
microgrid_client.connections = AsyncMock(return_value=[])

tests/timeseries/test_ev_charger_pool.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ class TestEVChargerPool:
2727

2828
async def test_state_updates(self, mocker: MockerFixture) -> None:
2929
"""Test ev charger state updates are visible."""
30-
3130
mockgrid = MockMicrogrid(
3231
grid_meter=False, api_client_streaming=True, sample_rate_s=0.01
3332
)

tests/timeseries/test_formula_engine.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,6 @@ class TestConstantValue:
643643

644644
async def test_constant_value(self) -> None:
645645
"""Test using constant values in formulas."""
646-
647646
channel_1 = Broadcast[Sample[Quantity]]("channel_1")
648647
channel_2 = Broadcast[Sample[Quantity]]("channel_2")
649648

0 commit comments

Comments
 (0)