From 65d0fac4c1a527c5e6f2dab949fc00cb67dc8e3b Mon Sep 17 00:00:00 2001 From: kadykov <62546709+kadykov@users.noreply.github.com> Date: Fri, 4 Aug 2023 19:08:41 +0200 Subject: [PATCH 1/2] Fix Transformation typing --- pint/facets/context/objects.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pint/facets/context/objects.py b/pint/facets/context/objects.py index 9001e9666..c0e2f0c67 100644 --- a/pint/facets/context/objects.py +++ b/pint/facets/context/objects.py @@ -24,8 +24,8 @@ class Transformation(Protocol): def __call__( - self, ureg: UnitRegistry, value: Magnitude, **kwargs: Any - ) -> Magnitude: + self, ureg: UnitRegistry, value: PlainQuantity, **kwargs: Any + ) -> PlainQuantity: ... From c47e595f28f384fddd89f292d5b4d77be7f405d1 Mon Sep 17 00:00:00 2001 From: Aleksandr Kadykov Date: Mon, 7 Aug 2023 10:21:59 +0200 Subject: [PATCH 2/2] Add PR to changelog --- CHANGES | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 1f5fe347d..ccc97f1eb 100644 --- a/CHANGES +++ b/CHANGES @@ -5,7 +5,7 @@ Pint Changelog ----------------- - Fixed Transformation type protocol. - (PR #1805) + (PR #1805, PR #1832) - Documented to_preferred and created added an autoautoconvert_to_preferred registry option. (PR #1803) - Optimize matplotlib unit conversion for Quantity arrays