dolfinx
dolfinx copied to clipboard
Add stubs for MeshTagsMetaClass
To make it possible to use mypy with external libraries.
Otherwise, one would get errors like:
library/file.py:74: error: "MeshTagsMetaClass" has no attribute "dim"
library/file.py:114: error: "MeshTagsMetaClass" has no attribute "indices"
library/file.py:114: error: "MeshTagsMetaClass" has no attribute "values"
Also add the correct ignores to make sure we catch other API changes.
Perhaps you need to define an explicit setter for name?
Perhaps you need to define an explicit setter for name?
To do that I had to rename the C++ property name, otherwise I got a recursion error.. However, then the signature of MeshTagsMetaClass and cpp.MeshTags<T> are different, and dolfinx.mesh.meshtags_from_entities returns a different object than
Close this for now. Issue made: https://github.com/FEniCS/dolfinx/issues/2348