class documentation

class HasMembers(ApiObject):

Known subclasses: docspec.Class, docspec.Module

View In Hierarchy

Base class for API objects that can have members, e.g. #Class and #Module.
Method sync​_hierarchy No summary
Class Variable members Undocumented
Instance Variable parent Returns the parent of the #HasMembers. Note that if you make any modifications to the API object tree, you will need to call #sync_hierarchy() afterwards because adding to #Class.members or #Module.members does not automatically keep the #parent property in sync.

Inherited from ApiObject:

Method __post​_init__ Undocumented
Method parent.setter Undocumented
Class Variable docstring Undocumented
Class Variable location Undocumented
Class Variable name Undocumented
Property path Returns a list of all of this API object's parents, from top to bottom. The list includes self as the last item.
Instance Variable ​_parent Undocumented
def sync_hierarchy(self, parent=None):
Synchronize the hierarchy of this API object and all of it's children. This should be called when the #HasMembers.members are updated to ensure that all child objects reference the right #parent. Loaders are expected to return #ApiObject#s in a fully synchronized state such that the user does not have to call this method unless they are doing modifications to the tree.
Parameters
parent:t.Optional[HasMembers]Undocumented
members: t.Sequence[ApiObject] =

Undocumented

parent =
Returns the parent of the #HasMembers. Note that if you make any modifications to the API object tree, you will need to call #sync_hierarchy() afterwards because adding to #Class.members or #Module.members does not automatically keep the #parent property in sync.