Skip to content

Fix Python overrides that use existing name

David Gobbi requested to merge dgobbi/vtk:fix-python-override-check into master

The 'override' function in the wrappers has a check to ensure that users don't override one wrapped C++ class with another wrapped C++ class (see a4b954b8). The overriding class must be a Python class that is a subclass of the overridden C++ class.

However, defined a class called vtkTestingInteractor and an override with this class failed because within VTK there is a class called vtkmodules.vtkTestingRendering.vtkTestingInteractor. The check has to consider not only the name, but also the type that the name resolves to, or else it will get false positives from classes with the same name that exist in different namespaces.

Edited by David Gobbi

Merge request reports