From 96e232589e9b0f3bb1c3b6c022df0e76c239bc34 Mon Sep 17 00:00:00 2001 From: Andrew Date: Mon, 17 Mar 2025 13:16:57 +0000 Subject: [PATCH 1/8] dunders --- src/metrology_apis/__init__.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/metrology_apis/__init__.py b/src/metrology_apis/__init__.py index 2fa8280..60a9bc9 100644 --- a/src/metrology_apis/__init__.py +++ b/src/metrology_apis/__init__.py @@ -39,6 +39,28 @@ def value(self) -> V: ... def unit(self) -> U: ... ### Dunder Methods + def __ne__[B](self: "Quantity[V, U]", other: "Quantity[op.CanEq[V, B], U]", /) -> B: ... + def __lt__[B](self: "Quantity[V, U]", other: "Quantity[op.CanOrd[V, B], U]", /) -> B: ... + def __le__[B](self: "Quantity[V, U]", other: "Quantity[op.CanOrd[V, B], U]", /) -> B: ... + def __gt__[B](self: "Quantity[V, U]", other: "Quantity[op.CanOrd[V, B], U]", /) -> B: ... + def __ge__[B](self: "Quantity[V, U]", other: "Quantity[op.CanOrd[V, B], U]", /) -> B: ... + + def __pos__(self: "Quantity[V, U]") -> "Quantity[op.CanPos[V], U]": ... + def __neg__(self: "Quantity[V, U]") -> "Quantity[op.CanNeg[V], U]": ... + def __abs__(self: "Quantity[V, U]") -> "Quantity[op.CanAbs[V], U]": ... + + def __add__[B](self: "Quantity[V, U]", other: "Quantity[op.CanAdd[V, B], U]", /) -> "Quantity[op.CanAdd[V, B], U]": ... + def __radd__[B](self: "Quantity[V, U]", other: "Quantity[op.CanAdd[V, B], U]", /) -> "Quantity[op.CanAdd[V, B], U]": ... + def __sub__[B](self: "Quantity[V, U]", other: "Quantity[op.CanSub[V, B], U]", /) -> "Quantity[op.CanSub[V, B], U]": ... + def __rsub__[B](self: "Quantity[V, U]", other: "Quantity[op.CanSub[V, B], U]", /) -> "Quantity[op.CanSub[V, B], U]": ... + + def __mul__[B](self: "Quantity[V, U]", other: "Quantity[op.CanMul[V, B], U]", /) -> "Quantity[op.CanMul[V, B], U]": ... + def __rmul__[B](self: "Quantity[V, U]", other: "Quantity[op.CanMul[V, B], U]", /) -> "Quantity[op.CanMul[V, B], U]": ... + def __truediv__[B](self: "Quantity[V, U]", other: "Quantity[op.CanDiv[V, B], U]", /) -> "Quantity[op.CanDiv[V, B], U]": ... + def __rtruediv__[B](self: "Quantity[V, U]", other: "Quantity[op.CanDiv[V, B], U]", /) -> "Quantity[op.CanDiv[V, B], U]": ... + + def __pow__(self: "Quantity[V, U]", other: int | float, /) -> "Quantity[op.CanPow[V], U]": ... + def __rpow__(self: "Quantity[V, U]", other: int | float, /) -> "Quantity[op.CanPow[V], U]": ... @override def __eq__[B]( # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] From 0398d052335342a67b1ad3b97ce84aabba123115 Mon Sep 17 00:00:00 2001 From: andrewgsavage Date: Tue, 18 Mar 2025 22:35:04 +0000 Subject: [PATCH 2/8] Update src/metrology_apis/__init__.py Co-authored-by: Lucas Colley --- src/metrology_apis/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/metrology_apis/__init__.py b/src/metrology_apis/__init__.py index 60a9bc9..a634e95 100644 --- a/src/metrology_apis/__init__.py +++ b/src/metrology_apis/__init__.py @@ -45,9 +45,9 @@ def __le__[B](self: "Quantity[V, U]", other: "Quantity[op.CanOrd[V, B], U]", /) def __gt__[B](self: "Quantity[V, U]", other: "Quantity[op.CanOrd[V, B], U]", /) -> B: ... def __ge__[B](self: "Quantity[V, U]", other: "Quantity[op.CanOrd[V, B], U]", /) -> B: ... - def __pos__(self: "Quantity[V, U]") -> "Quantity[op.CanPos[V], U]": ... - def __neg__(self: "Quantity[V, U]") -> "Quantity[op.CanNeg[V], U]": ... - def __abs__(self: "Quantity[V, U]") -> "Quantity[op.CanAbs[V], U]": ... + def __pos__[R](self: "Quantity[op.CanPos[R], U]") -> "Quantity[R, U]": ... + def __neg__[R](self: "Quantity[op.CanNeg[R], U]") -> "Quantity[R, U]": ... + def __abs__[R](self: "Quantity[op.CanAbs[R], U]") -> "Quantity[R, U]": ... def __add__[B](self: "Quantity[V, U]", other: "Quantity[op.CanAdd[V, B], U]", /) -> "Quantity[op.CanAdd[V, B], U]": ... def __radd__[B](self: "Quantity[V, U]", other: "Quantity[op.CanAdd[V, B], U]", /) -> "Quantity[op.CanAdd[V, B], U]": ... From d528b5fe1583d8fdb7b294ea7e3797a6253c0b69 Mon Sep 17 00:00:00 2001 From: andrewgsavage Date: Tue, 18 Mar 2025 22:35:10 +0000 Subject: [PATCH 3/8] Update src/metrology_apis/__init__.py Co-authored-by: Lucas Colley --- src/metrology_apis/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/metrology_apis/__init__.py b/src/metrology_apis/__init__.py index a634e95..3fb1be7 100644 --- a/src/metrology_apis/__init__.py +++ b/src/metrology_apis/__init__.py @@ -54,10 +54,10 @@ def __radd__[B](self: "Quantity[V, U]", other: "Quantity[op.CanAdd[V, B], U]", / def __sub__[B](self: "Quantity[V, U]", other: "Quantity[op.CanSub[V, B], U]", /) -> "Quantity[op.CanSub[V, B], U]": ... def __rsub__[B](self: "Quantity[V, U]", other: "Quantity[op.CanSub[V, B], U]", /) -> "Quantity[op.CanSub[V, B], U]": ... - def __mul__[B](self: "Quantity[V, U]", other: "Quantity[op.CanMul[V, B], U]", /) -> "Quantity[op.CanMul[V, B], U]": ... - def __rmul__[B](self: "Quantity[V, U]", other: "Quantity[op.CanMul[V, B], U]", /) -> "Quantity[op.CanMul[V, B], U]": ... - def __truediv__[B](self: "Quantity[V, U]", other: "Quantity[op.CanDiv[V, B], U]", /) -> "Quantity[op.CanDiv[V, B], U]": ... - def __rtruediv__[B](self: "Quantity[V, U]", other: "Quantity[op.CanDiv[V, B], U]", /) -> "Quantity[op.CanDiv[V, B], U]": ... + def __mul__[R](self: "Quantity[V, U]", other: "Quantity[op.CanRMul[V, R], U]", /) -> "Quantity[R, U]": ... + def __rmul__[R](self: "Quantity[V, U]", other: "Quantity[op.CanMul[V, R], U]", /) -> "Quantity[R, U]": ... + def __truediv__[R](self: "Quantity[V, U]", other: "Quantity[op.CanRTruediv[V, R], U]", /) -> "Quantity[R, U]": ... + def __rtruediv__[R](self: "Quantity[V, U]", other: "Quantity[op.CanTruediv[V, R], U]", /) -> "Quantity[R, U]": ... def __pow__(self: "Quantity[V, U]", other: int | float, /) -> "Quantity[op.CanPow[V], U]": ... def __rpow__(self: "Quantity[V, U]", other: int | float, /) -> "Quantity[op.CanPow[V], U]": ... From 32c67bbe7a5a6d2154721c9725e68af6cbe864bf Mon Sep 17 00:00:00 2001 From: andrewgsavage Date: Tue, 18 Mar 2025 22:35:17 +0000 Subject: [PATCH 4/8] Update src/metrology_apis/__init__.py Co-authored-by: Lucas Colley --- src/metrology_apis/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/metrology_apis/__init__.py b/src/metrology_apis/__init__.py index 3fb1be7..1083152 100644 --- a/src/metrology_apis/__init__.py +++ b/src/metrology_apis/__init__.py @@ -59,8 +59,8 @@ def __rmul__[R](self: "Quantity[V, U]", other: "Quantity[op.CanMul[V, R], U]", / def __truediv__[R](self: "Quantity[V, U]", other: "Quantity[op.CanRTruediv[V, R], U]", /) -> "Quantity[R, U]": ... def __rtruediv__[R](self: "Quantity[V, U]", other: "Quantity[op.CanTruediv[V, R], U]", /) -> "Quantity[R, U]": ... - def __pow__(self: "Quantity[V, U]", other: int | float, /) -> "Quantity[op.CanPow[V], U]": ... - def __rpow__(self: "Quantity[V, U]", other: int | float, /) -> "Quantity[op.CanPow[V], U]": ... + def __pow__[R](self: "Quantity[op.CanPow2[int | float, R], U]", other: int | float, /) -> "Quantity[R, U]": ... + def __rpow__[R](self: "Quantity[op.CanRPow2[int | float, R], U]", other: int | float, /) -> "Quantity[R, U]": ... @override def __eq__[B]( # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] From 3c55e70380ac0cde8629d8e4248aad390a0d5516 Mon Sep 17 00:00:00 2001 From: andrewgsavage Date: Tue, 18 Mar 2025 22:35:27 +0000 Subject: [PATCH 5/8] Update src/metrology_apis/__init__.py Co-authored-by: Lucas Colley --- src/metrology_apis/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/metrology_apis/__init__.py b/src/metrology_apis/__init__.py index 1083152..01e3498 100644 --- a/src/metrology_apis/__init__.py +++ b/src/metrology_apis/__init__.py @@ -49,10 +49,10 @@ def __pos__[R](self: "Quantity[op.CanPos[R], U]") -> "Quantity[R, U]": ... def __neg__[R](self: "Quantity[op.CanNeg[R], U]") -> "Quantity[R, U]": ... def __abs__[R](self: "Quantity[op.CanAbs[R], U]") -> "Quantity[R, U]": ... - def __add__[B](self: "Quantity[V, U]", other: "Quantity[op.CanAdd[V, B], U]", /) -> "Quantity[op.CanAdd[V, B], U]": ... - def __radd__[B](self: "Quantity[V, U]", other: "Quantity[op.CanAdd[V, B], U]", /) -> "Quantity[op.CanAdd[V, B], U]": ... - def __sub__[B](self: "Quantity[V, U]", other: "Quantity[op.CanSub[V, B], U]", /) -> "Quantity[op.CanSub[V, B], U]": ... - def __rsub__[B](self: "Quantity[V, U]", other: "Quantity[op.CanSub[V, B], U]", /) -> "Quantity[op.CanSub[V, B], U]": ... + def __add__[R](self: "Quantity[V, U]", other: "Quantity[op.CanRAdd[V, R], U", /) -> "Quantity[R, U]": ... + def __radd__[R](self: "Quantity[V, U]", other: "Quantity[op.CanAdd[V, R], U]", /) -> "Quantity[R, U]": ... + def __sub__[R](self: "Quantity[V, U]", other: "Quantity[op.CanRSub[V, R], U]", /) -> "Quantity[R, U]": ... + def __rsub__[R](self: "Quantity[V, U]", other: "Quantity[op.CanSub[V, R], U]", /) -> "Quantity[R, U]": ... def __mul__[R](self: "Quantity[V, U]", other: "Quantity[op.CanRMul[V, R], U]", /) -> "Quantity[R, U]": ... def __rmul__[R](self: "Quantity[V, U]", other: "Quantity[op.CanMul[V, R], U]", /) -> "Quantity[R, U]": ... From 27598ef61094104cfd7bfacf18418a3532122231 Mon Sep 17 00:00:00 2001 From: Lucas Colley Date: Fri, 28 Mar 2025 21:42:49 +0000 Subject: [PATCH 6/8] fixes --- src/metrology_apis/__init__.py | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/metrology_apis/__init__.py b/src/metrology_apis/__init__.py index 01e3498..f46ddb0 100644 --- a/src/metrology_apis/__init__.py +++ b/src/metrology_apis/__init__.py @@ -39,17 +39,23 @@ def value(self) -> V: ... def unit(self) -> U: ... ### Dunder Methods - def __ne__[B](self: "Quantity[V, U]", other: "Quantity[op.CanEq[V, B], U]", /) -> B: ... - def __lt__[B](self: "Quantity[V, U]", other: "Quantity[op.CanOrd[V, B], U]", /) -> B: ... - def __le__[B](self: "Quantity[V, U]", other: "Quantity[op.CanOrd[V, B], U]", /) -> B: ... - def __gt__[B](self: "Quantity[V, U]", other: "Quantity[op.CanOrd[V, B], U]", /) -> B: ... - def __ge__[B](self: "Quantity[V, U]", other: "Quantity[op.CanOrd[V, B], U]", /) -> B: ... + + @override + def __eq__[B](self: "Quantity[V, U]", other: "Quantity[op.CanEq[V, B], U]", /) -> B: ... # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] + + @override + def __ne__[B](self: "Quantity[V, U]", other: "Quantity[op.CanEq[V, B], U]", /) -> B: ... # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] + + def __lt__[B](self: "Quantity[V, U]", other: "Quantity[op.CanLt[V, B], U]", /) -> B: ... + def __le__[B](self: "Quantity[V, U]", other: "Quantity[op.CanLe[V, B], U]", /) -> B: ... + def __gt__[B](self: "Quantity[V, U]", other: "Quantity[op.CanGt[V, B], U]", /) -> B: ... + def __ge__[B](self: "Quantity[V, U]", other: "Quantity[op.CanGe[V, B], U]", /) -> B: ... def __pos__[R](self: "Quantity[op.CanPos[R], U]") -> "Quantity[R, U]": ... def __neg__[R](self: "Quantity[op.CanNeg[R], U]") -> "Quantity[R, U]": ... def __abs__[R](self: "Quantity[op.CanAbs[R], U]") -> "Quantity[R, U]": ... - def __add__[R](self: "Quantity[V, U]", other: "Quantity[op.CanRAdd[V, R], U", /) -> "Quantity[R, U]": ... + def __add__[R](self: "Quantity[V, U]", other: "Quantity[op.CanRAdd[V, R], U]", /) -> "Quantity[R, U]": ... def __radd__[R](self: "Quantity[V, U]", other: "Quantity[op.CanAdd[V, R], U]", /) -> "Quantity[R, U]": ... def __sub__[R](self: "Quantity[V, U]", other: "Quantity[op.CanRSub[V, R], U]", /) -> "Quantity[R, U]": ... def __rsub__[R](self: "Quantity[V, U]", other: "Quantity[op.CanSub[V, R], U]", /) -> "Quantity[R, U]": ... @@ -60,7 +66,7 @@ def __truediv__[R](self: "Quantity[V, U]", other: "Quantity[op.CanRTruediv[V, R] def __rtruediv__[R](self: "Quantity[V, U]", other: "Quantity[op.CanTruediv[V, R], U]", /) -> "Quantity[R, U]": ... def __pow__[R](self: "Quantity[op.CanPow2[int | float, R], U]", other: int | float, /) -> "Quantity[R, U]": ... - def __rpow__[R](self: "Quantity[op.CanRPow2[int | float, R], U]", other: int | float, /) -> "Quantity[R, U]": ... + def __rpow__[R](self: "Quantity[op.CanRPow[int | float, R], U]", other: int | float, /) -> "Quantity[R, U]": ... @override def __eq__[B]( # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] From 0f7ec35dbad87399c8d2e9b938978ad138265061 Mon Sep 17 00:00:00 2001 From: Lucas Colley Date: Fri, 28 Mar 2025 23:02:59 +0000 Subject: [PATCH 7/8] `JustInt | JustFloat` --- src/metrology_apis/__init__.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/metrology_apis/__init__.py b/src/metrology_apis/__init__.py index f46ddb0..6f77389 100644 --- a/src/metrology_apis/__init__.py +++ b/src/metrology_apis/__init__.py @@ -41,8 +41,10 @@ def unit(self) -> U: ... ### Dunder Methods @override - def __eq__[B](self: "Quantity[V, U]", other: "Quantity[op.CanEq[V, B], U]", /) -> B: ... # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] - + def __eq__[B]( # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] + self: "Quantity[V, U]", other: "Quantity[op.CanEq[V, B], U]", / + ) -> B: ... + @override def __ne__[B](self: "Quantity[V, U]", other: "Quantity[op.CanEq[V, B], U]", /) -> B: ... # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] @@ -65,10 +67,5 @@ def __rmul__[R](self: "Quantity[V, U]", other: "Quantity[op.CanMul[V, R], U]", / def __truediv__[R](self: "Quantity[V, U]", other: "Quantity[op.CanRTruediv[V, R], U]", /) -> "Quantity[R, U]": ... def __rtruediv__[R](self: "Quantity[V, U]", other: "Quantity[op.CanTruediv[V, R], U]", /) -> "Quantity[R, U]": ... - def __pow__[R](self: "Quantity[op.CanPow2[int | float, R], U]", other: int | float, /) -> "Quantity[R, U]": ... - def __rpow__[R](self: "Quantity[op.CanRPow[int | float, R], U]", other: int | float, /) -> "Quantity[R, U]": ... - - @override - def __eq__[B]( # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] - self: "Quantity[V, U]", other: "Quantity[op.CanEq[V, B], U]", / - ) -> B: ... + def __pow__[R](self: "Quantity[op.CanPow2[op.JustInt | op.JustFloat, R], U]", other: op.JustInt | op.JustFloat, /) -> "Quantity[R, U]": ... + def __rpow__[R](self: "Quantity[op.CanRPow[op.JustInt | op.JustFloat, R], U]", other: op.JustInt | op.JustFloat, /) -> "Quantity[R, U]": ... From bab5ce5750f89bdb3b4c069d5005b18163ceadfe Mon Sep 17 00:00:00 2001 From: Lucas Colley Date: Tue, 1 Apr 2025 11:54:51 +0100 Subject: [PATCH 8/8] lint --- src/metrology_apis/__init__.py | 70 +++++++++++++++++++++++++--------- 1 file changed, 52 insertions(+), 18 deletions(-) diff --git a/src/metrology_apis/__init__.py b/src/metrology_apis/__init__.py index 6f77389..9deff66 100644 --- a/src/metrology_apis/__init__.py +++ b/src/metrology_apis/__init__.py @@ -46,26 +46,60 @@ def __eq__[B]( # type: ignore[override] # pyright: ignore[reportIncompatibleMe ) -> B: ... @override - def __ne__[B](self: "Quantity[V, U]", other: "Quantity[op.CanEq[V, B], U]", /) -> B: ... # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] - - def __lt__[B](self: "Quantity[V, U]", other: "Quantity[op.CanLt[V, B], U]", /) -> B: ... - def __le__[B](self: "Quantity[V, U]", other: "Quantity[op.CanLe[V, B], U]", /) -> B: ... - def __gt__[B](self: "Quantity[V, U]", other: "Quantity[op.CanGt[V, B], U]", /) -> B: ... - def __ge__[B](self: "Quantity[V, U]", other: "Quantity[op.CanGe[V, B], U]", /) -> B: ... + def __ne__[B]( # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] + self: "Quantity[V, U]", other: "Quantity[op.CanEq[V, B], U]", / + ) -> B: ... + + def __lt__[B]( + self: "Quantity[V, U]", other: "Quantity[op.CanLt[V, B], U]", / + ) -> B: ... + def __le__[B]( + self: "Quantity[V, U]", other: "Quantity[op.CanLe[V, B], U]", / + ) -> B: ... + def __gt__[B]( + self: "Quantity[V, U]", other: "Quantity[op.CanGt[V, B], U]", / + ) -> B: ... + def __ge__[B]( + self: "Quantity[V, U]", other: "Quantity[op.CanGe[V, B], U]", / + ) -> B: ... def __pos__[R](self: "Quantity[op.CanPos[R], U]") -> "Quantity[R, U]": ... def __neg__[R](self: "Quantity[op.CanNeg[R], U]") -> "Quantity[R, U]": ... def __abs__[R](self: "Quantity[op.CanAbs[R], U]") -> "Quantity[R, U]": ... - def __add__[R](self: "Quantity[V, U]", other: "Quantity[op.CanRAdd[V, R], U]", /) -> "Quantity[R, U]": ... - def __radd__[R](self: "Quantity[V, U]", other: "Quantity[op.CanAdd[V, R], U]", /) -> "Quantity[R, U]": ... - def __sub__[R](self: "Quantity[V, U]", other: "Quantity[op.CanRSub[V, R], U]", /) -> "Quantity[R, U]": ... - def __rsub__[R](self: "Quantity[V, U]", other: "Quantity[op.CanSub[V, R], U]", /) -> "Quantity[R, U]": ... - - def __mul__[R](self: "Quantity[V, U]", other: "Quantity[op.CanRMul[V, R], U]", /) -> "Quantity[R, U]": ... - def __rmul__[R](self: "Quantity[V, U]", other: "Quantity[op.CanMul[V, R], U]", /) -> "Quantity[R, U]": ... - def __truediv__[R](self: "Quantity[V, U]", other: "Quantity[op.CanRTruediv[V, R], U]", /) -> "Quantity[R, U]": ... - def __rtruediv__[R](self: "Quantity[V, U]", other: "Quantity[op.CanTruediv[V, R], U]", /) -> "Quantity[R, U]": ... - - def __pow__[R](self: "Quantity[op.CanPow2[op.JustInt | op.JustFloat, R], U]", other: op.JustInt | op.JustFloat, /) -> "Quantity[R, U]": ... - def __rpow__[R](self: "Quantity[op.CanRPow[op.JustInt | op.JustFloat, R], U]", other: op.JustInt | op.JustFloat, /) -> "Quantity[R, U]": ... + def __add__[R]( + self: "Quantity[V, U]", other: "Quantity[op.CanRAdd[V, R], U]", / + ) -> "Quantity[R, U]": ... + def __radd__[R]( + self: "Quantity[V, U]", other: "Quantity[op.CanAdd[V, R], U]", / + ) -> "Quantity[R, U]": ... + def __sub__[R]( + self: "Quantity[V, U]", other: "Quantity[op.CanRSub[V, R], U]", / + ) -> "Quantity[R, U]": ... + def __rsub__[R]( + self: "Quantity[V, U]", other: "Quantity[op.CanSub[V, R], U]", / + ) -> "Quantity[R, U]": ... + + def __mul__[R]( + self: "Quantity[V, U]", other: "Quantity[op.CanRMul[V, R], U]", / + ) -> "Quantity[R, U]": ... + def __rmul__[R]( + self: "Quantity[V, U]", other: "Quantity[op.CanMul[V, R], U]", / + ) -> "Quantity[R, U]": ... + def __truediv__[R]( + self: "Quantity[V, U]", other: "Quantity[op.CanRTruediv[V, R], U]", / + ) -> "Quantity[R, U]": ... + def __rtruediv__[R]( + self: "Quantity[V, U]", other: "Quantity[op.CanTruediv[V, R], U]", / + ) -> "Quantity[R, U]": ... + + def __pow__[R]( + self: "Quantity[op.CanPow2[op.JustInt | op.JustFloat, R], U]", + other: op.JustInt | op.JustFloat, + /, + ) -> "Quantity[R, U]": ... + def __rpow__[R]( + self: "Quantity[op.CanRPow[op.JustInt | op.JustFloat, R], U]", + other: op.JustInt | op.JustFloat, + /, + ) -> "Quantity[R, U]": ...