Skip to content

Commit 6309ac6

Browse files
authored
Merge pull request #155 from jorenham/quaddtype-stubs-review-suggestions
2 parents 3179fc5 + 9182cdc commit 6309ac6

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

quaddtype/numpy_quaddtype/_quaddtype_main.pyi

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Any, Literal, TypeAlias, final
1+
from typing import Any, Literal, TypeAlias, final, overload
22

33
import numpy as np
44
from typing_extensions import Never, Self, override
@@ -109,6 +109,10 @@ class QuadPrecision: # NOTE: It doesn't inherit from `np.generic` which is type
109109

110110
#
111111
def is_longdouble_128() -> bool: ...
112+
113+
@overload
114+
def get_sleef_constant(constant_name: Literal["bits", "precision"], /) -> int: ...
115+
@overload
112116
def get_sleef_constant(
113117
constant_name: Literal[
114118
"pi",
@@ -121,14 +125,11 @@ def get_sleef_constant(
121125
"epsilon",
122126
"smallest_normal",
123127
"smallest_subnormal",
124-
"bits",
125-
"precision",
126128
"resolution",
127129
],
128130
/,
129131
) -> QuadPrecision: ...
132+
130133
def set_num_threads(num_threads: int, /) -> None: ...
131134
def get_num_threads() -> int: ...
132-
def get_quadblas_version() -> Literal[
133-
"QuadBLAS 1.0.0 - High Performance Quad Precision BLAS"
134-
]: ...
135+
def get_quadblas_version() -> str: ...

0 commit comments

Comments
 (0)