class documentation
class HasMembers(ApiObject): (source)
Known subclasses: pydocspec._docspec.Class, pydocspec._docspec.Module
Base class for API objects that can have members, e.g. #Class and #Module.
| Method | __init__ |
Undocumented |
| Method | sync |
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. |
| Instance Variable | members |
The members of the API object. |
| Instance Variable | parent |
The parent of the API object. |
Inherited from ApiObject:
| Instance Variable | docstring |
The documentation string of the API object. |
| Instance Variable | location |
The location of the API object, i.e. where it is sourced from/defined in the code. |
| Instance Variable | name |
The name of the entity. This is usually relative to the respective parent of the entity, as opposed to it's fully qualified name/absolute name. However, that is more of a recommendation than rule. For example the #docspec_python loader by default returns #Module objects with their full module name (and does not create a module hierarchy). |
| 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. |
Inherited from _HasInitAttribsMethod (via ApiObject):
| Method | _init |
A method to define extra attributes that will be set after initialization. |
overrides
pydocspec._docspec.ApiObject.__init__overridden in
pydocspec._docspec.Class, pydocspec._model.ModuleSynchronize 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[ | Undocumented |
parent =
(source)
overrides
pydocspec._docspec.ApiObject.parentoverridden in
pydocspec._model.Class, pydocspec._model.ModuleThe parent of the API object.