Source code for prettypython.text.info
"""Format an informational message.
The default foreground color is cyan, and bold styling is enabled
by default. Additional text styles can be configured with keyword
arguments.
Args:
text: The string to format.
**kwargs: Optional styling settings supported by the shared
styling engine, including ``bold``, ``underline``, ``italic``,
``dim``, ``reverse``, ``strikethrough``, ``color``, ``bg``,
and ``pure``. Unknown keyword arguments are ignored.
Returns:
str: The formatted string with ANSI escape sequences, or the
original string when ``pure=True``.
Raises:
TypeError: If ``text`` is not a string, or if ``color`` or ``bg``
has an invalid type.
ValueError: If a supplied foreground or background color name
is unsupported.
Example:
>>> from prettypython.text import info
>>> info("Example", pure=True)
'Example'
"""
from ._style import style
[docs]
def info(text: str, **kwargs: object) -> str:
"""Format text using the default cyan foreground."""
return style(text, "36", **kwargs)