Skip to content

Commit e0233a5

Browse files
committed
fix docstrings for sphinx
1 parent 6e15804 commit e0233a5

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

telegram/dispatcher.py

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,22 +61,29 @@ def async_func(*args, **kwargs):
6161
class Dispatcher:
6262
"""
6363
This class dispatches all kinds of updates to its registered handlers.
64+
A handler is a function that usually takes the following parameters
6465
65-
A handler is a function that usually takes the following parameters:
66-
bot: The telegram.Bot instance that received the message
67-
update: The update that should be handled by the handler
66+
bot:
67+
The telegram.Bot instance that received the message
68+
update:
69+
The update that should be handled by the handler
6870
69-
Error handlers take an additional parameter:
70-
error: The TelegramError instance that was raised during processing the
71+
Error handlers take an additional parameter
72+
73+
error:
74+
The TelegramError instance that was raised during processing the
7175
update
7276
7377
All handlers, except error handlers, can also request more information by
7478
appending one or more of the following arguments in their argument list for
75-
convenience:
76-
update_queue: The Queue instance which contains all new updates and is
79+
convenience
80+
81+
update_queue:
82+
The Queue instance which contains all new updates and is
7783
processed by the Dispatcher. Be careful with this - you might
7884
create an infinite loop.
79-
args: If the update is an instance str or telegram.Update, this will be
85+
args:
86+
If the update is an instance str or telegram.Update, this will be
8087
a list that contains the content of the message split on spaces,
8188
except the first word (usually the command).
8289
Example: '/add item1 item2 item3' -> ['item1', 'item2', 'item3']

telegram/updater.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,8 @@ def idle(self, stop_signals=(SIGINT, SIGTERM, SIGABRT)):
249249
Args:
250250
stop_signals: Iterable containing signals from the signal module
251251
that should be subscribed to. Updater.stop() will be called on
252-
receiving one of those signals.
252+
receiving one of those signals. Defaults to (SIGINT, SIGTERM,
253+
SIGABRT)
253254
"""
254255
for sig in stop_signals:
255256
signal(sig, self.signal_handler)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy