Closed mkofler96 closed 7 months ago
Looks ok will have to see how much better the autocomplete will work with these added.
After a quick look, a lot of the files are superfluous since they are not able to add typing information examples most init files.
Looks ok will have to see how much better the autocomplete will work with these added.
After a quick look, a lot of the files are superfluous since they are not able to add typing information examples most init files.
I think there is still manual work needed to overwrite the Incomplete
, but at least one does not have to write each entire .pyi file.
Also, what I saw is that if you run the stubgen splinepy
command when there are already .pyi files present, the types are not overwritten to Incomplete
, but the correct type is kept.
Overview
There is the possibility to automatically generate .pyi files for type hinting by mypy, which can by installed by
pip install mypy
and run bystubgen splinepy
. The auto-generated .pyi files look like this:and need to be translated to somethings like this by using e.g.
import numpy.typing as _npt
The stub generation is not useful for final use, but it still provides at least the basic layout of the .pyi files.
What do you think? @j042 @jzwar @clemens-fricke