Server : Apache System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64 User : dh_edsupp ( 6597262) PHP Version : 8.2.26 Disable Function : NONE Directory : /lib/python3/dist-packages/numpy/typing/tests/data/reveal/ |
Upload File : |
"""Typing tests for `numpy.core._ufunc_config`.""" import numpy as np def func(a: str, b: int) -> None: ... class Write: def write(self, value: str) -> None: ... reveal_type(np.seterr(all=None)) # E: TypedDict('numpy.core._ufunc_config._ErrDict' reveal_type(np.seterr(divide="ignore")) # E: TypedDict('numpy.core._ufunc_config._ErrDict' reveal_type(np.seterr(over="warn")) # E: TypedDict('numpy.core._ufunc_config._ErrDict' reveal_type(np.seterr(under="call")) # E: TypedDict('numpy.core._ufunc_config._ErrDict' reveal_type(np.seterr(invalid="raise")) # E: TypedDict('numpy.core._ufunc_config._ErrDict' reveal_type(np.geterr()) # E: TypedDict('numpy.core._ufunc_config._ErrDict' reveal_type(np.setbufsize(4096)) # E: int reveal_type(np.getbufsize()) # E: int reveal_type(np.seterrcall(func)) # E: Union[None, def (builtins.str, builtins.int) -> Any, numpy.core._ufunc_config._SupportsWrite] reveal_type(np.seterrcall(Write())) # E: Union[None, def (builtins.str, builtins.int) -> Any, numpy.core._ufunc_config._SupportsWrite] reveal_type(np.geterrcall()) # E: Union[None, def (builtins.str, builtins.int) -> Any, numpy.core._ufunc_config._SupportsWrite] reveal_type(np.errstate(call=func, all="call")) # E: numpy.errstate[def (a: builtins.str, b: builtins.int)] reveal_type(np.errstate(call=Write(), divide="log", over="log")) # E: numpy.errstate[ufunc_config.Write]