MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / __init__

Method __init__

pager_lib/tqdm/contrib/telegram.py:105–121  ·  view source on GitHub ↗

Parameters ---------- token : str, required. Telegram token [default: ${TQDM_TELEGRAM_TOKEN}]. chat_id : str, required. Telegram chat ID [default: ${TQDM_TELEGRAM_CHAT_ID}]. See `tqdm.auto.tqdm.__init__` for other parameters.

(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

103 ... ...
104 """
105 def __init__(self, *args, **kwargs):
106 """
107 Parameters
108 ----------
109 token : str, required. Telegram token
110 [default: ${TQDM_TELEGRAM_TOKEN}].
111 chat_id : str, required. Telegram chat ID
112 [default: ${TQDM_TELEGRAM_CHAT_ID}].
113
114 See `tqdm.auto.tqdm.__init__` for other parameters.
115 """
116 if not kwargs.get('disable'):
117 kwargs = kwargs.copy()
118 self.tgio = TelegramIO(
119 kwargs.pop('token', getenv('TQDM_TELEGRAM_TOKEN')),
120 kwargs.pop('chat_id', getenv('TQDM_TELEGRAM_CHAT_ID')))
121 super().__init__(*args, **kwargs)
122
123 def display(self, **kwargs):
124 super().display(**kwargs)

Callers

nothing calls this directly

Calls 5

TelegramIOClass · 0.85
copyMethod · 0.80
popMethod · 0.80
getMethod · 0.45
__init__Method · 0.45

Tested by

no test coverage detected