Skip to content

Commit 9ffcbfd

Browse files
committed
adding stubs
1 parent 798e503 commit 9ffcbfd

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

quaddtype/numpy_quaddtype/_quaddtype_main.pyi

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from typing import Any, Literal, TypeAlias, final, overload
2-
2+
import builtins
33
import numpy as np
44
from numpy._typing import _128Bit # pyright: ignore[reportPrivateUsage]
55
from typing_extensions import Never, Self, override
@@ -157,9 +157,8 @@ class QuadPrecision(np.floating[_128Bit]):
157157
# NOTE: is_integer() and as_integer_ratio() are defined on numpy.floating in the
158158
# stubs, but don't exist at runtime. And because QuadPrecision does not implement
159159
# them, we use this hacky workaround to emulate their absence.
160-
# TODO: Remove after https://github.com/numpy/numpy-user-dtypes/issues/216
161-
is_integer: Never # pyright: ignore[reportIncompatibleMethodOverride]
162-
as_integer_ratio: Never # pyright: ignore[reportIncompatibleMethodOverride]
160+
def is_integer(self, /) -> builtins.bool: ...
161+
def as_integer_ratio(self, /) -> tuple[int, int]: ...
163162

164163
#
165164
def is_longdouble_128() -> bool: ...

0 commit comments

Comments
 (0)