Skip to content

Node type overriding #139

@barneydobson

Description

@barneydobson

In addition to using node_type_override to make the Model "see" the Node as that type, you may also need to set the __name__, as some code uses this property to distinguish the type. For example, here which will impact if you are making a custom River subclass. In such a case in the subclass __init__ you would need to set self.__class__.__name__ = "River".

This needs to be updated in the documentation, or (preferably) this kind of behaviour needs to be fixed in some way, as it is not a good way to distinguish Node types.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions