Skip to content

Improvements to the generate_pyi script

David Gobbi requested to merge dgobbi/vtk:pyi-type-fixes into master

The primary change is that multi-valued arguments that used to be annotated with (float, float, float) are now annotated with Sequence[float], as per PEP 484. Note that for Python 3.9 onwards, it would be possible to supply the size as an additional annotation, for example Annotated[Sequence[float], Size(3)], but I'm not aware of any IDEs that support these extra annotations.

In addition, the code has been tidied up a bit and inconsistencies in the output have been fixed.

Closes #18538 (closed)

Edited by David Gobbi

Merge request reports