StringFormatter
- class osaft.core.helper.StringFormatter[source]
Bases:
objectConsistent Formatting for __str__ and __repr__ methods
Public Methods:
get_str_text(description, variable, value[, ...])Returns a constant formatting for the __str__ method of the ARF classes
- static get_str_text(description, variable, value, unit=None, linebreak=True)[source]
Returns a constant formatting for the __str__ method of the ARF classes
- Parameters:
description (
str) – Physical name for the variablevariable (
str) – symbol/name of the variablevalue (
Union[float,int,str,Enum]) – value of the variableunit (
Optional[str], optional) – unit of the variableDefault:Nonelinebreak (
bool, optional) – Appends a linebreak to the end of the textDefault:True- Return type:
str