qrunch.common.printing_util
Module that include printing utilities.
Functions
|
Print a summary of class. |
|
Recursively convert dataclass object to a dictionary, including nested dataclasses. |
|
Print the input arguments as a string. |
|
Recursively summarize a value into a string. |
- class_summary(**kwargs: Any) str
Print a summary of class.
- Parameters:
**kwargs (Any) – Keyword arguments passed to the function.
- Return type:
str
- dataclass_to_string(obj: Any, exclude: list[str] | None = None) str
Recursively convert dataclass object to a dictionary, including nested dataclasses.
- Parameters:
obj (Any) – The dataclass object to convert.
exclude (list[str] | None) – List of attribute names to exclude from the string.
- Return type:
str
- input_summary(**kwargs: Any) str
Print the input arguments as a string.
- Parameters:
**kwargs (Any) – Keyword arguments passed to the function.
- Return type:
str
- summarize_value(value: Any) str
Recursively summarize a value into a string.
The handling includes dataclasses, dictionaries, lists, and tuples.
- Parameters:
value (Any) – The value to summarize.
- Return type:
str