diff --git a/src/numpy-stubs/lib/_utils_impl.pyi b/src/numpy-stubs/lib/_utils_impl.pyi index 00ed47c9..0fe235cc 100644 --- a/src/numpy-stubs/lib/_utils_impl.pyi +++ b/src/numpy-stubs/lib/_utils_impl.pyi @@ -1,10 +1,17 @@ -from _typeshed import SupportsWrite +from _typeshed import SupportsWrite as CanWrite +from typing import Any +from typing_extensions import LiteralString, TypeVar -from numpy._typing import DTypeLike +import numpy as np __all__ = ["get_include", "info", "show_runtime"] -def get_include() -> str: ... +_DTypeT = TypeVar("_DTypeT", bound=np.dtype[Any]) + +### + +# +def get_include() -> LiteralString: ... def show_runtime() -> None: ... -def info(object: object = ..., maxwidth: int = ..., output: SupportsWrite[str] | None = ..., toplevel: str = ...) -> None: ... -def drop_metadata(dtype: DTypeLike, /) -> DTypeLike: ... +def info(object: object = None, maxwidth: int = 76, output: CanWrite[str] | None = None, toplevel: str = "numpy") -> None: ... +def drop_metadata(dtype: _DTypeT, /) -> _DTypeT: ...