From 9182cdc1a937b292fcdd097fd55e85138c72c8c3 Mon Sep 17 00:00:00 2001 From: jorenham Date: Thu, 18 Sep 2025 08:46:25 +0200 Subject: [PATCH] TYP: Review suggestions from #154 Co-authored-by: Juniper Tyree <50025784+juntyr@users.noreply.github.com> --- quaddtype/numpy_quaddtype/_quaddtype_main.pyi | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/quaddtype/numpy_quaddtype/_quaddtype_main.pyi b/quaddtype/numpy_quaddtype/_quaddtype_main.pyi index 72c334b1..21e2850e 100644 --- a/quaddtype/numpy_quaddtype/_quaddtype_main.pyi +++ b/quaddtype/numpy_quaddtype/_quaddtype_main.pyi @@ -1,4 +1,4 @@ -from typing import Any, Literal, TypeAlias, final +from typing import Any, Literal, TypeAlias, final, overload import numpy as np from typing_extensions import Never, Self, override @@ -109,6 +109,10 @@ class QuadPrecision: # NOTE: It doesn't inherit from `np.generic` which is type # def is_longdouble_128() -> bool: ... + +@overload +def get_sleef_constant(constant_name: Literal["bits", "precision"], /) -> int: ... +@overload def get_sleef_constant( constant_name: Literal[ "pi", @@ -121,14 +125,11 @@ def get_sleef_constant( "epsilon", "smallest_normal", "smallest_subnormal", - "bits", - "precision", "resolution", ], /, ) -> QuadPrecision: ... + def set_num_threads(num_threads: int, /) -> None: ... def get_num_threads() -> int: ... -def get_quadblas_version() -> Literal[ - "QuadBLAS 1.0.0 - High Performance Quad Precision BLAS" -]: ... +def get_quadblas_version() -> str: ...