Helpers
lahuta.core.helpers ¶
Helper functions to retrieve class methods and/or attributes. It is intended to be used by and for NeighborPairs, even though the functions are generic.
get_class_methods ¶
get_class_methods(cls)
Retrieve all the methods of the specified class.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
cls |
NeighborPairs
|
The class to inspect. |
required |
Returns:
Type | Description |
---|---|
list[str]
|
list[str]: A list of strings containing the names of all the methods of the specified class. |
Source code in lahuta/core/helpers.py
10 11 12 13 14 15 16 17 18 19 |
|
get_class_properties ¶
get_class_properties(cls)
Retrieve all the properties of the specified class.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
cls |
NeighborPairs
|
The class to inspect. |
required |
Returns:
Type | Description |
---|---|
list[str]
|
list[str]: A list of strings containing the names of all the properties of the specified class. |
Source code in lahuta/core/helpers.py
22 23 24 25 26 27 28 29 30 31 |
|
get_class_attributes ¶
get_class_attributes(cls)
Retrieve all the attributes (not methods or properties) of the specified class.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
cls |
NeighborPairs
|
The class to inspect. |
required |
Returns:
Type | Description |
---|---|
list[str]
|
list[str]: A list of strings containing the names of all the attributes (not methods or properties) |
list[str]
|
of the specified class. |
Source code in lahuta/core/helpers.py
34 35 36 37 38 39 40 41 42 43 44 |
|