CompAero/internal.py
def to_string(name: str, value: Union[float, int, bool], precision: int, dot_line: bool = False) -> str:
    """This generates a professional easy to read string for a data value

    Args:
        name (str): Name that is to be printed with value
        value (Union[float, int, bool]): Value that is to be printed
        precision (int, optional): precision to round value to. Defaults to 4.
        dot_line (bool, optional): prints a dotted line between the name and the value This is used
                                    when multiple values are printed in a column. Defaults to False.

    Returns:
        str: A formatted string with new line character on the end
    """
    valString = str(round(value, precision)) if not isinstance(value, (bool, str,)) else str(value)
    name = name + ":"
    sep = "-" if dot_line else ""
    return "|{:{sep}<{width}}{}|{}\n".format(
        name, valString, Style.RESET_ALL, width=INTERNAL_VALUE_WIDTH - len(valString), sep=sep
    )
This generates a professional easy to read string for a data value

    Args:
        name (str): Name that is to be printed with value
        value (Union[float, int, bool]): Value that is to be printed
        precision (int, optional): precision to round value to. Defaults to 4.
        dot_line (bool, optional): prints a dotted line between the name and the value This is used
                                    when multiple values are printed in a column. Defaults to False.

    Returns:
        str: A formatted string with new line character on the end
    
This generates a professional easy to read string for a data value
This generates a professional easy to read string for a data value
def to_string(name: str, value: Union[float, int, bool], precision: int, dot_line: bool = False) -> str:
    valString = str(round(value, precision)) if not isinstance(value, (bool, str,)) else str(value)
    name = name + ":"
    sep = "-" if dot_line else ""
    return "|{:{sep}<{width}}{}|{}\n".format(
        name, valString, Style.RESET_ALL, width=INTERNAL_VALUE_WIDTH - len(valString), sep=sep
    )
def to_string ( name : str , value : Union [ float , int , bool ] , precision : int , dot_line : bool = False ) -> str : valString = str ( round ( value , precision ) ) if not isinstance ( value , ( bool , str , ) ) else str ( value ) name = name + ":" sep = "-" if dot_line else "" return "|{:{sep}<{width}}{}|{}\n" . format ( name , valString , Style . RESET_ALL , width = INTERNAL_VALUE_WIDTH - len ( valString ) , sep = sep )
This generates a professional easy to read string for a data value
This generates a professional easy to read string for a data value
"""This generates a professional easy to read string for a data value

    Args:
        name (str): Name that is to be printed with value
        value (Union[float, int, bool]): Value that is to be printed
        precision (int, optional): precision to round value to. Defaults to 4.
        dot_line (bool, optional): prints a dotted line between the name and the value This is used
                                    when multiple values are printed in a column. Defaults to False.

    Returns:
        str: A formatted string with new line character on the end
    """
A formatted string with new line character on the end
A formatted string with new line character on the end
str
name
str
Name that is to be printed with value
Name that is to be printed with value
value
Union[float, int, bool]
Value that is to be printed
Value that is to be printed
precision
int
precision to round value to. Defaults to 4.
precision to round value to . Defaults to 4 .
4
dot_line
bool
prints a dotted line between the name and the value This is used
when multiple values are printed in a column. Defaults to False.
prints a dotted line between the name and the value This is used when multiple values are printed in a column . Defaults to False .