Skip to content

Commit 724e50c

Browse files
committed
Add missing Returns and Raises to docstrings
Signed-off-by: Leandro Lucarella <[email protected]>
1 parent ca3d726 commit 724e50c

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

benchmarks/timeseries/ringbuffer_serialization.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ def benchmark_serialization(
4545
Args:
4646
ringbuffer: Ringbuffer to benchmark to serialize.
4747
iterations: amount of iterations to run.
48+
49+
Returns:
50+
Average time to dump and load the ringbuffer.
4851
"""
4952
total = 0.0
5053
for _ in range(iterations):

tests/timeseries/mock_microgrid.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ def __init__( # pylint: disable=too-many-arguments
7575
different namespaces.
7676
graph: optional, a graph of components to use instead of the default grid
7777
layout. If specified, grid_meter must be None.
78+
79+
Raises:
80+
ValueError: if both grid_meter and graph are specified.
7881
"""
7982
if grid_meter is not None and graph is not None:
8083
raise ValueError("grid_meter and graph are mutually exclusive")

tests/utils/graph_generator.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,9 @@ def _to_graph(
190190
191191
Returns:
192192
a tuple containing the components and connections of the graph.
193+
194+
Raises:
195+
ValueError: if the input is invalid.
193196
"""
194197

195198
def inverter_type(category: ComponentCategory) -> InverterType | None:

0 commit comments

Comments
 (0)