Skip to content

Conversation

@llucax
Copy link
Contributor

@llucax llucax commented Jun 20, 2024

llucax added 4 commits June 20, 2024 13:28
This is safe to provide for every quantity and brings it closer to a
regular `float`, which means they can be used in generic code.

Signed-off-by: Leandro Lucarella <[email protected]>
This is safe to provide for every quantity and brings it closer to a
regular `float`, which means they can be used in generic code.

Signed-off-by: Leandro Lucarella <[email protected]>
This is safe to provide for every quantity and brings it closer to a
regular `float`, which means they can be used in generic code.

Signed-off-by: Leandro Lucarella <[email protected]>
Signed-off-by: Leandro Lucarella <[email protected]>
@llucax llucax requested a review from a team as a code owner June 20, 2024 11:31
@llucax llucax requested a review from shsms June 20, 2024 11:31
@llucax llucax self-assigned this Jun 20, 2024
@llucax llucax added this to the v1.0.0 milestone Jun 20, 2024
@github-actions github-actions bot added part:docs Affects the documentation part:tests Affects the unit, integration and performance (benchmarks) tests part:code Affects the code in general labels Jun 20, 2024
@llucax llucax enabled auto-merge June 20, 2024 11:32
@llucax
Copy link
Contributor Author

llucax commented Jun 20, 2024

Enabled auto-merge.

@llucax llucax added the type:enhancement New feature or enhancement visitble to users label Jun 20, 2024
Returns:
This quantity.
"""
return self
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blankline after function?

Returns:
The rounded quantity.
"""
return self._new(round(self._base_value, ndigits))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blankline after function?

@pytest.mark.parametrize("ndigits", [0, 1, 2, 3])
def test_round(value: float, ndigits: int) -> None:
"""Test the rounding of the quantities."""
assert round(Quantity(value), ndigits) == Quantity(round(value, ndigits))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also a blnak line here?

Copy link
Contributor

@Marenz Marenz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, it seems the blanklines are correct after all, you just distributed the correct blankline-diffs over different commits

@llucax llucax added this pull request to the merge queue Jun 21, 2024
Merged via the queue into frequenz-floss:v1.x.x with commit 0b56444 Jun 21, 2024
@llucax llucax deleted the more-ops branch June 21, 2024 11:10
@llucax
Copy link
Contributor Author

llucax commented Jun 21, 2024

Oh, I guess the "stage these lines" from git gui lied to me, the diff that showed to me had the correct blank lines. Sorry!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

part:code Affects the code in general part:docs Affects the documentation part:tests Affects the unit, integration and performance (benchmarks) tests type:enhancement New feature or enhancement visitble to users

Projects

Development

Successfully merging this pull request may close these issues.

2 participants