A mypy plugin is now available for automatically assigning the (platform-dependent) precisions of certain ~numpy.number subclasses, including the likes of ~numpy.int_, ~numpy.intp and ~numpy.longlong. See the documentation on :ref:`scalar types <arrays.scalars.built-in>` for a comprehensive overview of the affected classes.
Note that while usage of the plugin is completely optional, without it the precision of above-mentioned classes will be inferred as ~typing.Any.
To enable the plugin, one must add it to their mypy configuration file:
[mypy]
plugins = numpy.typing.mypy_plugin