ENH: Improve the placeholder annotations within sub-modules (part 2)#18853
ENH: Improve the placeholder annotations within sub-modules (part 2)#18853charris merged 6 commits intonumpy:mainfrom
Conversation
numpy/lib/mixins.pyi
Outdated
There was a problem hiding this comment.
NDArrayOperatorsMixin is not technically an abstract baseclass, but in practice it is relient on subclasses implementing __array_ufunc__. Let me know if this should be changed or not.
There was a problem hiding this comment.
typo: relient -> reliant
aka `np.lib.scimath`
i.e. because it's a private module
4d80321 to
ee78c44
Compare
| ROOT / "__init__.pyi", | ||
| ROOT / "char.pyi", | ||
| ROOT / "ctypeslib.pyi", | ||
| ROOT / "emath.pyi", |
There was a problem hiding this comment.
The comment below says """Test if all ``.pyi`` files are properly installed.""". Based on that, the new (and renamed) .pyi files should probably be added here?
There was a problem hiding this comment.
I'd say it'd be fairly redundant here.
The reason for introducing this test is that numpy has a number of sub-packages (e.g. numpy/lib/setup.py), each of which needs to recognize .pyi as valid data files. Since the main numpy/lib/__init__.pyi file is already tested in aforementioned test, adding these new .pyi file adds little value.,
Co-Authored-By: h-vetinari <h.vetinari@gmx.com>
|
Thanks Bas. |
Xref #18838; follow up on #18842.
This PR improves the current Any-based placeholder annotations within a number of modules,
replacing them with explicit functions, classes or objects when appropiate. While parameters of the
respective methods and functions remain unannotated (for now), these changes nevertheless provides
a notable improvement over a plain Any.
Part 2 out of 3 in a series of PRs; updates the placeholder annotations of
np.linalgandnp.lib.