@@ -23,7 +23,7 @@ def asquantity(obj: Q | V, *, unit: U) -> Q: ...
23
23
24
24
@runtime_checkable
25
25
class Dimension (Protocol ):
26
- def __metrology_namespace__ [Q : Quantity , U : Unit ](
26
+ def __metrology_namespace__ [Q : Quantity [ V , U , Self ], V , U : Unit [ Self ] ](
27
27
self , / , * , api_version : str | None = None
28
28
) -> MetrologyNamespace [Q , U , Self ]:
29
29
"""
@@ -101,64 +101,64 @@ def unit(self) -> U: ...
101
101
102
102
@override
103
103
def __eq__ [B ]( # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride]
104
- self : "Quantity[V, U]" , other : "Quantity[op.CanEq[V, B], U]" , /
104
+ self : "Quantity[V, U, D ]" , other : "Quantity[op.CanEq[V, B], U, D ]" , /
105
105
) -> B : ...
106
106
107
107
@override
108
108
def __ne__ [B ]( # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride]
109
- self : "Quantity[V, U]" , other : "Quantity[op.CanEq[V, B], U]" , /
109
+ self : "Quantity[V, U, D ]" , other : "Quantity[op.CanEq[V, B], U, D ]" , /
110
110
) -> B : ...
111
111
112
112
def __lt__ [B ](
113
- self : "Quantity[V, U]" , other : "Quantity[op.CanLt[V, B], U]" , /
113
+ self : "Quantity[V, U, D ]" , other : "Quantity[op.CanLt[V, B], U, D ]" , /
114
114
) -> B : ...
115
115
def __le__ [B ](
116
- self : "Quantity[V, U]" , other : "Quantity[op.CanLe[V, B], U]" , /
116
+ self : "Quantity[V, U, D ]" , other : "Quantity[op.CanLe[V, B], U, D ]" , /
117
117
) -> B : ...
118
118
def __gt__ [B ](
119
- self : "Quantity[V, U]" , other : "Quantity[op.CanGt[V, B], U]" , /
119
+ self : "Quantity[V, U, D ]" , other : "Quantity[op.CanGt[V, B], U, D ]" , /
120
120
) -> B : ...
121
121
def __ge__ [B ](
122
- self : "Quantity[V, U]" , other : "Quantity[op.CanGe[V, B], U]" , /
122
+ self : "Quantity[V, U, D ]" , other : "Quantity[op.CanGe[V, B], U, D ]" , /
123
123
) -> B : ...
124
124
125
- def __pos__ [R ](self : "Quantity[op.CanPos[R], U]" ) -> "Quantity[R, U]" : ...
126
- def __neg__ [R ](self : "Quantity[op.CanNeg[R], U]" ) -> "Quantity[R, U]" : ...
127
- def __abs__ [R ](self : "Quantity[op.CanAbs[R], U]" ) -> "Quantity[R, U]" : ...
125
+ def __pos__ [R ](self : "Quantity[op.CanPos[R], U, D ]" ) -> "Quantity[R, U, D ]" : ...
126
+ def __neg__ [R ](self : "Quantity[op.CanNeg[R], U, D ]" ) -> "Quantity[R, U, D ]" : ...
127
+ def __abs__ [R ](self : "Quantity[op.CanAbs[R], U, D ]" ) -> "Quantity[R, U, D ]" : ...
128
128
129
129
def __add__ [R ](
130
- self : "Quantity[V, U]" , other : "Quantity[op.CanRAdd[V, R], U]" , /
131
- ) -> "Quantity[R, U]" : ...
130
+ self : "Quantity[V, U, D ]" , other : "Quantity[op.CanRAdd[V, R], U, D ]" , /
131
+ ) -> "Quantity[R, U, D ]" : ...
132
132
def __radd__ [R ](
133
- self : "Quantity[V, U]" , other : "Quantity[op.CanAdd[V, R], U]" , /
134
- ) -> "Quantity[R, U]" : ...
133
+ self : "Quantity[V, U, D ]" , other : "Quantity[op.CanAdd[V, R], U, D ]" , /
134
+ ) -> "Quantity[R, U, D ]" : ...
135
135
def __sub__ [R ](
136
- self : "Quantity[V, U]" , other : "Quantity[op.CanRSub[V, R], U]" , /
137
- ) -> "Quantity[R, U]" : ...
136
+ self : "Quantity[V, U, D ]" , other : "Quantity[op.CanRSub[V, R], U, D ]" , /
137
+ ) -> "Quantity[R, U, D ]" : ...
138
138
def __rsub__ [R ](
139
- self : "Quantity[V, U]" , other : "Quantity[op.CanSub[V, R], U]" , /
140
- ) -> "Quantity[R, U]" : ...
139
+ self : "Quantity[V, U, D ]" , other : "Quantity[op.CanSub[V, R], U, D ]" , /
140
+ ) -> "Quantity[R, U, D ]" : ...
141
141
142
142
def __mul__ [R ](
143
- self : "Quantity[V, U]" , other : "Quantity[op.CanRMul[V, R], U]" , /
144
- ) -> "Quantity[R, U]" : ...
143
+ self : "Quantity[V, U, D ]" , other : "Quantity[op.CanRMul[V, R], U, D ]" , /
144
+ ) -> "Quantity[R, U, D ]" : ...
145
145
def __rmul__ [R ](
146
- self : "Quantity[V, U]" , other : "Quantity[op.CanMul[V, R], U]" , /
147
- ) -> "Quantity[R, U]" : ...
146
+ self : "Quantity[V, U, D ]" , other : "Quantity[op.CanMul[V, R], U, D ]" , /
147
+ ) -> "Quantity[R, U, D ]" : ...
148
148
def __truediv__ [R ](
149
- self : "Quantity[V, U]" , other : "Quantity[op.CanRTruediv[V, R], U]" , /
150
- ) -> "Quantity[R, U]" : ...
149
+ self : "Quantity[V, U, D ]" , other : "Quantity[op.CanRTruediv[V, R], U, D ]" , /
150
+ ) -> "Quantity[R, U, D ]" : ...
151
151
def __rtruediv__ [R ](
152
- self : "Quantity[V, U]" , other : "Quantity[op.CanTruediv[V, R], U]" , /
153
- ) -> "Quantity[R, U]" : ...
152
+ self : "Quantity[V, U, D ]" , other : "Quantity[op.CanTruediv[V, R], U, D ]" , /
153
+ ) -> "Quantity[R, U, D ]" : ...
154
154
155
155
def __pow__ [R ](
156
- self : "Quantity[op.CanPow2[op.JustInt | op.JustFloat, R], U]" ,
156
+ self : "Quantity[op.CanPow2[op.JustInt | op.JustFloat, R], U, D ]" ,
157
157
other : op .JustInt | op .JustFloat ,
158
158
/ ,
159
- ) -> "Quantity[R, U]" : ...
159
+ ) -> "Quantity[R, U, D ]" : ...
160
160
def __rpow__ [R ](
161
- self : "Quantity[op.CanRPow[op.JustInt | op.JustFloat, R], U]" ,
161
+ self : "Quantity[op.CanRPow[op.JustInt | op.JustFloat, R], U, D ]" ,
162
162
other : op .JustInt | op .JustFloat ,
163
163
/ ,
164
- ) -> "Quantity[R, U]" : ...
164
+ ) -> "Quantity[R, U, D ]" : ...
0 commit comments