Skip to content

Commit

Permalink
Typing: Fix return type of PlainQuantity.to (#2090)
Browse files Browse the repository at this point in the history
  • Loading branch information
denialhaag authored Dec 15, 2024
1 parent d886c20 commit 3cbf3dd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Pint Changelog

- Add docs to the functions in ``pint.testing`` (PR #2070)
- Fix round function returning float instead of int (#2081)
- Fix return type of `PlainQuantity.to` (#2088)
- Update constants to CODATA 2022 recommended values. (#2049)
- Fixed issue with `.to_compact` and Magnitudes with uncertainties / Quantities with units (PR #2069, issue #2044)

Expand Down
3 changes: 2 additions & 1 deletion pint/facets/plain/quantity.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
is_duck_array_type,
is_upcast_type,
np,
Self,
zero_or_nan,
)
from ...errors import DimensionalityError, OffsetUnitCalculusError, PintTypeError
Expand Down Expand Up @@ -515,7 +516,7 @@ def ito(

def to(
self, other: QuantityOrUnitLike | None = None, *contexts, **ctx_kwargs
) -> PlainQuantity:
) -> Self:
"""Return PlainQuantity rescaled to different units.
Parameters
Expand Down

0 comments on commit 3cbf3dd

Please sign in to comment.