Skip to content

Commit ed3c2e3

Browse files
committed
enum stubs
1 parent b64b25f commit ed3c2e3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

quaddtype/numpy_quaddtype/_quaddtype_main.pyi

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
from typing import Any, Literal, TypeAlias, final, overload
22
import builtins
3+
import enum
34
import numpy as np
45
from numpy._typing import _128Bit # pyright: ignore[reportPrivateUsage]
56
from typing_extensions import Never, Self, override
67

8+
class QuadBackend(enum.IntEnum):
9+
SLEEF = 0
10+
LONGDOUBLE = 1
11+
712
_Backend: TypeAlias = Literal["sleef", "longdouble"]
813
_IntoQuad: TypeAlias = (
914
QuadPrecision
@@ -22,7 +27,7 @@ class QuadPrecDType(np.dtype[QuadPrecision]): # type: ignore[misc] # pyright:
2227

2328
# QuadPrecDType specific attributes
2429
@property
25-
def backend(self) -> Literal[0, 1]: ...
30+
def backend(self) -> QuadBackend: ...
2631

2732
# `numpy.dtype` overrides
2833
names: None # pyright: ignore[reportIncompatibleVariableOverride]

0 commit comments

Comments
 (0)