Helpers to populate attributes of Class instances.
| Class | MRO |
Implements MRO resoling for pydocspec.Class instances. |
| Function | constructor |
returns the __init__ method, i'm a bit dummy. |
| Function | inherited |
provide inherited_members property |
| Function | is |
Returns whether the given class is an abstract class. |
| Function | is |
must be set after resolved_bases |
| Function | is |
Check if class ob is a subclass of any of the base classes in baseclasses. :returns: True if ob is derived from any of the base classes. |
| Function | mro |
compute mro from apiobjects. must be set after resolved_bases |
| Function | mro |
Compute MRO from astroid, this does not require pydocspec.Class.resolved_bases. |
| Function | process |
for all resolved_bases classes, add ob to the subclasses list |
| Function | resolved |
direct bases of this class, if the name cannot be resolved as an apiobject, fallback to expanded name str. uses name resolution. |
| Constant | EXCEPTIONS |
Undocumented |
| Function | _nested |
Helper function to retreive the complete list of base classes chains (represented by tuples) for a given Class. A chain of classes is used to compute the member inheritence from the first element to the last element of the chain. |
| Function | _unmasked |
Helper function to reteive the list of inherited children given a base classes chain (As yielded by nested_bases). |
returns the __init__ method, i'm a bit dummy.
| Parameters | |
ob:_model.Class | Undocumented |
| Returns | |
Optional[ | Undocumented |
provide inherited_members property
| Parameters | |
ob:pydocspec.Class | Undocumented |
| Returns | |
List[ | Undocumented |
Returns whether the given class is an abstract class.
Must be set after Class.inherited_members.
| Parameters | |
ob:pydocspec.Class | Undocumented |
| Returns | |
bool | Undocumented |
Check if class ob is a subclass of any of the base classes in baseclasses.
:returns: True if ob is derived from any of the base classes.
False otherwise.
| Parameters | |
ob:pydocspec.Class | Undocumented |
baseclasses:Sequence[ | Undocumented |
| Returns | |
bool | Undocumented |
compute mro from apiobjects. must be set after resolved_bases
| Parameters | |
ob:pydocspec.Class | Undocumented |
| Returns | |
List[ | Undocumented |
Compute MRO from astroid, this does not require pydocspec.Class.resolved_bases.
Returns NotImplemented if the tree has not been built with astroid.
| Parameters | |
ob:_model.Class | Undocumented |
| Returns | |
Union[ | Undocumented |
for all resolved_bases classes, add ob to the subclasses list
| Parameters | |
ob:pydocspec.Class | Undocumented |
direct bases of this class, if the name cannot be resolved as an apiobject, fallback to expanded name str. uses name resolution.
| Parameters | |
ob:pydocspec.Class | Undocumented |
| Returns | |
List[ | Undocumented |
Undocumented
| Value |
|
Helper function to retreive the complete list of base classes chains (represented by tuples) for a given Class. A chain of classes is used to compute the member inheritence from the first element to the last element of the chain.
The first yielded chain only contains the Class itself.
- Then for each of the super-classes respecting the MRO:
- the next yielded chain contains the super class and the class itself,
- the the next yielded chain contains the super-super class, the super class and the class itself, etc...
| Parameters | |
classobj:pydocspec.Class | Undocumented |
| Returns | |
Iterator[ | Undocumented |
Helper function to reteive the list of inherited children
given a base classes chain (As yielded by nested_bases).
The returned members are inherited from the Class listed first in the chain to the Class listed last: they are not overriden in between.
| Parameters | |
baselist:Sequence[ | Undocumented |
| Returns | |
List[ | Undocumented |