diff options
Diffstat (limited to 'numpy/typing/mypy_plugin.py')
-rw-r--r-- | numpy/typing/mypy_plugin.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/numpy/typing/mypy_plugin.py b/numpy/typing/mypy_plugin.py index 5ac75f94d..1ffe74fa9 100644 --- a/numpy/typing/mypy_plugin.py +++ b/numpy/typing/mypy_plugin.py @@ -70,7 +70,7 @@ def _get_precision_dict() -> dict[str, str]: ret = {} for name, typ in names: n: int = 8 * typ().dtype.itemsize - ret[f'numpy.typing._nbit.{name}'] = f"numpy._{n}Bit" + ret[f'numpy._typing._nbit.{name}'] = f"numpy._{n}Bit" return ret @@ -106,7 +106,7 @@ def _get_c_intp_name() -> str: return "c_long" -#: A dictionary mapping type-aliases in `numpy.typing._nbit` to +#: A dictionary mapping type-aliases in `numpy._typing._nbit` to #: concrete `numpy.typing.NBitBase` subclasses. _PRECISION_DICT: Final = _get_precision_dict() @@ -121,7 +121,7 @@ def _hook(ctx: AnalyzeTypeContext) -> Type: """Replace a type-alias with a concrete ``NBitBase`` subclass.""" typ, _, api = ctx name = typ.name.split(".")[-1] - name_new = _PRECISION_DICT[f"numpy.typing._nbit.{name}"] + name_new = _PRECISION_DICT[f"numpy._typing._nbit.{name}"] return api.named_type(name_new) @@ -177,7 +177,7 @@ if TYPE_CHECKING or MYPY_EX is None: if file.fullname == "numpy": _override_imports( - file, "numpy.typing._extended_precision", + file, "numpy._typing._extended_precision", imports=[(v, v) for v in _EXTENDED_PRECISION_LIST], ) elif file.fullname == "numpy.ctypeslib": |