MCPcopy Index your code
hub / github.com/python-cmd2/cmd2 / pwarning

Method pwarning

cmd2/cmd2.py:1613–1641  ·  view source on GitHub ↗

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
    )

Source from the content-addressed store, hash-verified

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.

Callers 8

do_setMethod · 0.95
do_run_pyscriptMethod · 0.95
do_run_scriptMethod · 0.95
do_cutMethod · 0.80
do_stirMethod · 0.80
test_pwarningFunction · 0.80
do_theme_showMethod · 0.80

Calls 1

perrorMethod · 0.95

Tested by 3

do_cutMethod · 0.64
do_stirMethod · 0.64
test_pwarningFunction · 0.64