Handle all import-based overrides. * Import platform-specific extended-precision `numpy.number` subclasses (*e.g.* `numpy.float96`, `numpy.float128` and `numpy.complex256`). * Import the appropriate `ctypes` equivalent to `numpy.intp`.
(
self, file: MypyFile
)
| 162 | return None |
| 163 | |
| 164 | def get_additional_deps( |
| 165 | self, file: MypyFile |
| 166 | ) -> list[tuple[int, str, int]]: |
| 167 | """Handle all import-based overrides. |
| 168 | |
| 169 | * Import platform-specific extended-precision `numpy.number` |
| 170 | subclasses (*e.g.* `numpy.float96`, `numpy.float128` and |
| 171 | `numpy.complex256`). |
| 172 | * Import the appropriate `ctypes` equivalent to `numpy.intp`. |
| 173 | |
| 174 | """ |
| 175 | ret = [(PRI_MED, file.fullname, -1)] |
| 176 | |
| 177 | if file.fullname == "numpy": |
| 178 | _override_imports( |
| 179 | file, "numpy._typing._extended_precision", |
| 180 | imports=[(v, v) for v in _EXTENDED_PRECISION_LIST], |
| 181 | ) |
| 182 | elif file.fullname == "numpy.ctypeslib": |
| 183 | _override_imports( |
| 184 | file, "ctypes", |
| 185 | imports=[(_C_INTP, "_c_intp")], |
| 186 | ) |
| 187 | return ret |
| 188 | |
| 189 | def plugin(version: str) -> type[_NumpyPlugin]: |
| 190 | """An entry-point for mypy.""" |
nothing calls this directly
no test coverage detected