Skip to content

Commit 9d45a46

Browse files
Apply suggestions from code review
Co-authored-by: daniel-zullo-frequenz <[email protected]> Signed-off-by: Leandro Lucarella <[email protected]>
1 parent 5118985 commit 9d45a46

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/frequenz/sdk/timeseries/_quantities.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ def __mul__(self, scalar: float, /) -> Self:
339339
"""Scale this quantity by a scalar.
340340
341341
Args:
342-
scalar: The scaler by which to scale this quantity.
342+
scalar: The scalar by which to scale this quantity.
343343
344344
Returns:
345345
The scaled quantity.
@@ -619,10 +619,10 @@ def __mul__(self, scalar: float, /) -> Self:
619619
"""Scale this power by a scalar.
620620
621621
Args:
622-
scalar: The scaler by which to scale this power.
622+
scalar: The scalar by which to scale this power.
623623
624624
Returns:
625-
The scaled quantity.
625+
The scaled power.
626626
"""
627627

628628
@overload
@@ -772,10 +772,10 @@ def __mul__(self, scalar: float, /) -> Self:
772772
"""Scale this current by a scalar.
773773
774774
Args:
775-
scalar: The scaler by which to scale this current.
775+
scalar: The scalar by which to scale this current.
776776
777777
Returns:
778-
The scaled quantity.
778+
The scaled current.
779779
"""
780780

781781
@overload
@@ -900,10 +900,10 @@ def __mul__(self, scalar: float, /) -> Self:
900900
"""Scale this voltage by a scalar.
901901
902902
Args:
903-
scalar: The scaler by which to scale this voltage.
903+
scalar: The scalar by which to scale this voltage.
904904
905905
Returns:
906-
The scaled quantity.
906+
The scaled voltage.
907907
"""
908908

909909
@overload

tests/timeseries/test_quantities.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ def test_quantity_multiplied_with_precentage(
595595
def test_quantity_multiplied_with_float(
596596
quantity_ctor: type[Quantity], quantity_value: float, scalar: float
597597
) -> None:
598-
"""Test the multiplication of all quantities with percentage."""
598+
"""Test the multiplication of all quantities with a float."""
599599
quantity = quantity_ctor(quantity_value)
600600
expected_value = quantity.base_value * scalar
601601
print(f"{quantity=}, {expected_value=}")

0 commit comments

Comments
 (0)