Wrap perror, but apply Cmd2Style.WARNING. For details on the parameters, refer to the `print_to` method documentation.
(
self,
*objects: Any,
sep: str = " ",
end: str = "\n",
soft_wrap: bool = True,
justify: JustifyMethod | None = None,
emoji: bool = False,
markup: bool = False,
highlight: bool = False,
rich_print_kwargs: Mapping[str, Any] | None = None,
**kwargs: Any, # noqa: ARG002
)
| 1611 | ) |
| 1612 | |
| 1613 | def pwarning( |
| 1614 | self, |
| 1615 | *objects: Any, |
| 1616 | sep: str = " ", |
| 1617 | end: str = "\n", |
| 1618 | soft_wrap: bool = True, |
| 1619 | justify: JustifyMethod | None = None, |
| 1620 | emoji: bool = False, |
| 1621 | markup: bool = False, |
| 1622 | highlight: bool = False, |
| 1623 | rich_print_kwargs: Mapping[str, Any] | None = None, |
| 1624 | **kwargs: Any, # noqa: ARG002 |
| 1625 | ) -> None: |
| 1626 | """Wrap perror, but apply Cmd2Style.WARNING. |
| 1627 | |
| 1628 | For details on the parameters, refer to the `print_to` method documentation. |
| 1629 | """ |
| 1630 | self.perror( |
| 1631 | *objects, |
| 1632 | sep=sep, |
| 1633 | end=end, |
| 1634 | style=Cmd2Style.WARNING, |
| 1635 | soft_wrap=soft_wrap, |
| 1636 | justify=justify, |
| 1637 | emoji=emoji, |
| 1638 | markup=markup, |
| 1639 | highlight=highlight, |
| 1640 | rich_print_kwargs=rich_print_kwargs, |
| 1641 | ) |
| 1642 | |
| 1643 | def format_exception(self, exception: BaseException) -> str: |
| 1644 | """Format an exception for printing. |