Skip to content

Commit f74221a

Browse files
Fix typos in code documentation
Signed-off-by: Daniel Zullo <[email protected]>
1 parent b69163a commit f74221a

File tree

11 files changed

+15
-15
lines changed

11 files changed

+15
-15
lines changed

src/frequenz/sdk/_internal/_asyncio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ async def cancel_and_await(task: asyncio.Task[Any]) -> None:
1515
1616
Exits immediately if the task is already done.
1717
18-
The `CancelledError` is suppresed, but any other exception will be propagated.
18+
The `CancelledError` is suppressed, but any other exception will be propagated.
1919
2020
Args:
2121
task: The task to be cancelled and waited for.

src/frequenz/sdk/actor/_resampling.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def __init__( # pylint: disable=too-many-arguments
4343
the [`DataSourcingActor`][frequenz.sdk.actor.DataSourcingActor]
4444
to subscribe to component metrics.
4545
resampling_request_receiver: The receiver to use to receive new
46-
resampmling subscription requests.
46+
resampling subscription requests.
4747
config: The configuration for the resampler.
4848
name: The name of the actor. If `None`, `str(id(self))` will be used. This
4949
is used mostly for debugging purposes.

src/frequenz/sdk/microgrid/_graph.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,7 @@ def dfs(
721721
"""
722722
Search for components that fulfill the condition in the Graph.
723723
724-
DFS is used for searching the graph. The graph travarsal is stopped
724+
DFS is used for searching the graph. The graph traversal is stopped
725725
once a component fulfills the condition.
726726
727727
Args:
@@ -730,7 +730,7 @@ def dfs(
730730
condition: The condition function to check for.
731731
732732
Returns:
733-
A set of component ids where the coresponding components fulfill
733+
A set of component ids where the corresponding components fulfill
734734
the condition function.
735735
"""
736736
if current_node in visited:

src/frequenz/sdk/microgrid/component/_component_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ class BatteryData(ComponentData):
180180
# pylint: enable=line-too-long
181181

182182
temperature: float
183-
"""The (average) temperature reported by the battery, in Celcius (°C)."""
183+
"""The (average) temperature reported by the battery, in Celsius (°C)."""
184184

185185
_relay_state: battery_pb.RelayState.ValueType
186186
"""State of the battery relay."""

src/frequenz/sdk/timeseries/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
Classes normally take a (re)sampling period as and argument and, optionally, an
1616
`align_to` argument.
1717
18-
This means timestamps are always separated exaclty by a period, and that this
18+
This means timestamps are always separated exactly by a period, and that this
1919
timestamp falls always at multiples of the period, starting at the `align_to`.
2020
2121
This ensures that the data is predictable and consistent among restarts.

src/frequenz/sdk/timeseries/_formula_engine/_exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55

66

77
class FormulaEngineError(Exception):
8-
"""An error occured while fetching metrics or applying the formula on them."""
8+
"""An error occurred while fetching metrics or applying the formula on them."""

src/frequenz/sdk/timeseries/_formula_engine/_formula_generators/_grid_power_formula.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def generate( # noqa: DOC502
2929
)
3030
grid_successors = self._get_grid_component_successors()
3131

32-
# generate a formula that just adds values from all commponents that are
32+
# generate a formula that just adds values from all components that are
3333
# directly connected to the grid. If the requested formula type is
3434
# `PASSIVE_SIGN_CONVENTION`, there is nothing more to do. If the requested
3535
# formula type is `PRODUCTION`, the formula output is negated, then clipped to

src/frequenz/sdk/timeseries/_periodic_feature_extractor.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ class RelativePositions:
3535
Holds the relative positions of a window in a buffer.
3636
3737
When calculating a profile the user has to pass two datetime objects which
38-
are determaning a window. It's allowed that this window is not contained in
38+
are determining a window. It's allowed that this window is not contained in
3939
the historical data buffer.
4040
In order to calculate the profile the window is shifted to the first
41-
position in the buffer where it occurrs first and represented by indexes
41+
position in the buffer where it occurs first and represented by indexes
4242
relative to the oldest sample in the buffer.
4343
"""
4444

@@ -260,7 +260,7 @@ def _get_relative_positions(
260260
# the current position is inside that window or the window that would
261261
# be overwritten next.
262262
#
263-
# Move the window to its first appereance in the MovingWindow relative
263+
# Move the window to its first appearance in the MovingWindow relative
264264
# to the oldest sample stored in the MovingWindow.
265265
#
266266
# In other words the oldest stored sample is considered to have index 0.
@@ -367,7 +367,7 @@ def _get_reshaped_np_array(
367367
"""
368368
Create a reshaped numpy array from the MovingWindow.
369369
370-
The reshaped array is a two dimemsional array, where one dimension is
370+
The reshaped array is a two dimensional array, where one dimension is
371371
the window_size and the other the number of windows returned by the
372372
`_get_buffer_bounds` method.
373373

src/frequenz/sdk/timeseries/_quantities.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ def __format__(self, __format_spec: str) -> str:
168168
If specified, must be of this form: `[0].{precision}`. If a 0 is not given, the
169169
trailing zeros will be omitted. If no precision is given, the default is 3.
170170
171-
The returned string will use the unit that will result in the maxium precision,
171+
The returned string will use the unit that will result in the maximum precision,
172172
based on the magnitude of the value.
173173
174174
Example:

src/frequenz/sdk/timeseries/_ringbuffer/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# License: MIT
22
# Copyright © 2023 Frequenz Energy-as-a-Service GmbH
33

4-
"""Ringbuffer implementation & utilties."""
4+
"""Ringbuffer implementation & utilities."""
55

66
from .buffer import Gap, OrderedRingBuffer
77
from .serialization import dump, load

0 commit comments

Comments
 (0)