Skip to content

Allow generation of pyi files for python .py modules

David Gobbi requested to merge dgobbi/vtk:python-pyi-cleanup into master

This change allows to generate .pyi files for ordinary .py modules.

By default, only generates .pyi files for extension modules (specifically, for the wrapped VTK modules). It does this because .pyi files are the only way to attach type annotation to extension modules.

However, it can still be useful to generate .pyi files for ordinary .py modules, as long as the classes they contain are extension types. The best example of this is vtkmodules/ But generation of all.pyi is not done by default, because it is not necessary for all IDEs (some IDEs can figure out what modules the classes in were originally defined in, and grab the type annotations from the .pyi files for those modules).

Merge request reports