MCPcopy Index your code
hub / github.com/python-telegram-bot/python-telegram-bot / _warn

Method _warn

src/telegram/_bot.py:617–626  ·  view source on GitHub ↗

Convenience method to issue a warning. This method is here mostly to make it easier for ExtBot to add 1 level to all warning calls.

(
        cls,
        message: str | PTBUserWarning,
        category: type[Warning] = PTBUserWarning,
        stacklevel: int = 0,
    )

Source from the content-addressed store, hash-verified

615
616 @classmethod
617 def _warn(
618 cls,
619 message: str | PTBUserWarning,
620 category: type[Warning] = PTBUserWarning,
621 stacklevel: int = 0,
622 ) -> None:
623 """Convenience method to issue a warning. This method is here mostly to make it easier
624 for ExtBot to add 1 level to all warning calls.
625 """
626 warn(message=message, category=category, stacklevel=stacklevel + 1)
627
628 def _parse_file_input(
629 self,

Callers 2

__init__Method · 0.95
do_api_requestMethod · 0.95

Calls 1

warnFunction · 0.90

Tested by

no test coverage detected