Skip to content

Commit 0feacd5

Browse files
fix mypy
1 parent 68e363c commit 0feacd5

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

tunits/core/__init__.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,8 @@ class Value(Generic[NumericalT], WithUnit, np.generic, SupportsIndex):
229229
real: 'Value'
230230
imag: 'Value'
231231

232+
# needed because np.generic declars __new__ as abstract.
233+
def __new__(cls: type[T], *args: Any, **kwargs: Any) -> T: ...
232234
@classmethod
233235
def from_proto(cls: type[T], msg: tunits_pb2.Value) -> T: ...
234236
def to_proto(self, msg: tunits_pb2.Value | None = None) -> tunits_pb2.Value: ...

0 commit comments

Comments
 (0)