ClassProfile
ClassDataClassSource
ClassProfile(
properties: list[property | cached_property] = [],
methods: list[function | classmethod | staticmethod] = [],
operators: dict[str, function] = dict(...),
abstract_attrs: AbstractAttrs | None = None
)
A temporary profile extracted from the class.
This profile is used only to aggregate a class's attributes. The information will be persisted by the following docstring conversion.
Fields
| Name | Type | Required | |
|---|---|---|---|
properties | list[property | cached_property] | All properties of this class. | |
methods | list[function | classmethod | staticmethod] | All instance/class/static methods of this class. | |
operators | dict[str, function] | All overloaded operators of this class. | |
abstract_attrs | AbstractAttrs | None | Optional abstract attributes. It is None when the class is not abstract. |
Methods
from_class
v_1: Self = ClassProfile.from_class(base_cls: type[Any])
Get the profile of a class.
Requires
| Name | Type | Required | |
|---|---|---|---|
base_cls | type[Any] | The class where the profile will be analyzed. |
Returns
| Name | Type | |
|---|---|---|
v_1 | Self | The analyzed class profile. |