Skip to content

Commit d40f0a8

Browse files
committed
update update_queue and job_queue docstrings on all handlers
1 parent 783f9c3 commit d40f0a8

10 files changed

+80
-60
lines changed

telegram/ext/callbackqueryhandler.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,14 @@ class CallbackQueryHandler(Handler):
3131
callback (function): A function that takes ``bot, update`` as
3232
positional arguments. It will be called when the ``check_update``
3333
has determined that an update should be processed by this handler.
34-
pass_update_queue (optional[bool]): If the handler should be passed the
35-
update queue as a keyword argument called ``update_queue``. It can
36-
be used to insert updates. Default is ``False``
37-
pass_job_queue (optional[bool]): If the callback should be passed the job queue as a
38-
keyword argument called ``job_queue``. It can be used to schedule new jobs.
39-
Default is ``False``
34+
pass_update_queue (optional[bool]): If set to ``True``, a keyword argument called
35+
``update_queue`` will be passed to the callback function. It will be the ``Queue``
36+
instance used by the ``Updater`` and ``Dispatcher`` that contains new updates which can
37+
be used to insert updates. Default is ``False``.
38+
pass_job_queue (optional[bool]): If set to ``True``, a keyword argument called
39+
``job_queue`` will be passed to the callback function. It will be a ``JobQueue``
40+
instance created by the ``Updater`` which can be used to schedule new jobs.
41+
Default is ``False``.
4042
"""
4143

4244
def __init__(self, callback, pass_update_queue=False, pass_job_queue=False):

telegram/ext/choseninlineresulthandler.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,14 @@ class ChosenInlineResultHandler(Handler):
3232
callback (function): A function that takes ``bot, update`` as
3333
positional arguments. It will be called when the ``check_update``
3434
has determined that an update should be processed by this handler.
35-
pass_update_queue (optional[bool]): If the handler should be passed the
36-
update queue as a keyword argument called ``update_queue``. It can
37-
be used to insert updates. Default is ``False``
38-
pass_job_queue (optional[bool]): If the callback should be passed the job queue as a
39-
keyword argument called ``job_queue``. It can be used to schedule new jobs.
40-
Default is ``False``
35+
pass_update_queue (optional[bool]): If set to ``True``, a keyword argument called
36+
``update_queue`` will be passed to the callback function. It will be the ``Queue``
37+
instance used by the ``Updater`` and ``Dispatcher`` that contains new updates which can
38+
be used to insert updates. Default is ``False``.
39+
pass_job_queue (optional[bool]): If set to ``True``, a keyword argument called
40+
``job_queue`` will be passed to the callback function. It will be a ``JobQueue``
41+
instance created by the ``Updater`` which can be used to schedule new jobs.
42+
Default is ``False``.
4143
"""
4244

4345
def __init__(self, callback, pass_update_queue=False, pass_job_queue=False):

telegram/ext/commandhandler.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,14 @@ class CommandHandler(Handler):
3838
arguments passed to the command as a keyword argument called `
3939
``args``. It will contain a list of strings, which is the text
4040
following the command split on spaces. Default is ``False``
41-
pass_update_queue (optional[bool]): If the handler should be passed the
42-
update queue as a keyword argument called ``update_queue``. It can
43-
be used to insert updates. Default is ``False``
44-
pass_job_queue (optional[bool]): If the callback should be passed the job queue as a
45-
keyword argument called ``job_queue``. It can be used to schedule new jobs.
46-
Default is ``False``
41+
pass_update_queue (optional[bool]): If set to ``True``, a keyword argument called
42+
``update_queue`` will be passed to the callback function. It will be the ``Queue``
43+
instance used by the ``Updater`` and ``Dispatcher`` that contains new updates which can
44+
be used to insert updates. Default is ``False``.
45+
pass_job_queue (optional[bool]): If set to ``True``, a keyword argument called
46+
``job_queue`` will be passed to the callback function. It will be a ``JobQueue``
47+
instance created by the ``Updater`` which can be used to schedule new jobs.
48+
Default is ``False``.
4749
"""
4850

4951
def __init__(self,

telegram/ext/handler.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,14 @@ class Handler(object):
3131
callback (function): A function that takes ``bot, update`` as
3232
positional arguments. It will be called when the ``check_update``
3333
has determined that an update should be processed by this handler.
34-
pass_update_queue (optional[bool]): If the callback should be passed
35-
the update queue as a keyword argument called ``update_queue``. It
36-
can be used to insert updates. Default is ``False``
37-
pass_job_queue (optional[bool]): If the callback should be passed the job queue as a
38-
keyword argument called ``job_queue``. It can be used to schedule new jobs.
39-
Default is ``False``
34+
pass_update_queue (optional[bool]): If set to ``True``, a keyword argument called
35+
``update_queue`` will be passed to the callback function. It will be the ``Queue``
36+
instance used by the ``Updater`` and ``Dispatcher`` that contains new updates which can
37+
be used to insert updates. Default is ``False``.
38+
pass_job_queue (optional[bool]): If set to ``True``, a keyword argument called
39+
``job_queue`` will be passed to the callback function. It will be a ``JobQueue``
40+
instance created by the ``Updater`` which can be used to schedule new jobs.
41+
Default is ``False``.
4042
"""
4143

4244
def __init__(self, callback, pass_update_queue=False, pass_job_queue=False):

telegram/ext/inlinequeryhandler.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,14 @@ class InlineQueryHandler(Handler):
3131
callback (function): A function that takes ``bot, update`` as
3232
positional arguments. It will be called when the ``check_update``
3333
has determined that an update should be processed by this handler.
34-
pass_update_queue (optional[bool]): If the handler should be passed the
35-
update queue as a keyword argument called ``update_queue``. It can
36-
be used to insert updates. Default is ``False``
37-
pass_job_queue (optional[bool]): If the callback should be passed the job queue as a
38-
keyword argument called ``job_queue``. It can be used to schedule new jobs.
39-
Default is ``False``
34+
pass_update_queue (optional[bool]): If set to ``True``, a keyword argument called
35+
``update_queue`` will be passed to the callback function. It will be the ``Queue``
36+
instance used by the ``Updater`` and ``Dispatcher`` that contains new updates which can
37+
be used to insert updates. Default is ``False``.
38+
pass_job_queue (optional[bool]): If set to ``True``, a keyword argument called
39+
``job_queue`` will be passed to the callback function. It will be a ``JobQueue``
40+
instance created by the ``Updater`` which can be used to schedule new jobs.
41+
Default is ``False``.
4042
"""
4143

4244
def __init__(self, callback, pass_update_queue=False, pass_job_queue=False):

telegram/ext/messagehandler.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,14 @@ class MessageHandler(Handler):
9999
callback (function): A function that takes ``bot, update`` as
100100
positional arguments. It will be called when the ``check_update``
101101
has determined that an update should be processed by this handler.
102-
pass_update_queue (optional[bool]): If the handler should be passed the
103-
update queue as a keyword argument called ``update_queue``. It can
104-
be used to insert updates. Default is ``False``
105-
pass_job_queue (optional[bool]): If the callback should be passed the job queue as a
106-
keyword argument called ``job_queue``. It can be used to schedule new jobs.
107-
Default is ``False``
102+
pass_update_queue (optional[bool]): If set to ``True``, a keyword argument called
103+
``update_queue`` will be passed to the callback function. It will be the ``Queue``
104+
instance used by the ``Updater`` and ``Dispatcher`` that contains new updates which can
105+
be used to insert updates. Default is ``False``.
106+
pass_job_queue (optional[bool]): If set to ``True``, a keyword argument called
107+
``job_queue`` will be passed to the callback function. It will be a ``JobQueue``
108+
instance created by the ``Updater`` which can be used to schedule new jobs.
109+
Default is ``False``.
108110
"""
109111

110112
def __init__(self, filters, callback, pass_update_queue=False, pass_job_queue=False):

telegram/ext/regexhandler.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,14 @@ class RegexHandler(Handler):
4545
pass_groupdict (optional[bool]): If the callback should be passed the
4646
result of ``re.match(pattern, text).groupdict()`` as a keyword
4747
argument called ``groupdict``. Default is ``False``
48-
pass_update_queue (optional[bool]): If the handler should be passed the
49-
update queue as a keyword argument called ``update_queue``. It can
50-
be used to insert updates. Default is ``False``
51-
pass_job_queue (optional[bool]): If the callback should be passed the job queue as a
52-
keyword argument called ``job_queue``. It can be used to schedule new jobs.
53-
Default is ``False``
48+
pass_update_queue (optional[bool]): If set to ``True``, a keyword argument called
49+
``update_queue`` will be passed to the callback function. It will be the ``Queue``
50+
instance used by the ``Updater`` and ``Dispatcher`` that contains new updates which can
51+
be used to insert updates. Default is ``False``.
52+
pass_job_queue (optional[bool]): If set to ``True``, a keyword argument called
53+
``job_queue`` will be passed to the callback function. It will be a ``JobQueue``
54+
instance created by the ``Updater`` which can be used to schedule new jobs.
55+
Default is ``False``.
5456
"""
5557

5658
def __init__(self,

telegram/ext/stringcommandhandler.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,14 @@ class StringCommandHandler(Handler):
3636
arguments passed to the command as a keyword argument called `
3737
``args``. It will contain a list of strings, which is the text
3838
following the command split on spaces. Default is ``False``
39-
pass_update_queue (optional[bool]): If the handler should be passed the
40-
update queue as a keyword argument called ``update_queue``. It can
41-
be used to insert updates. Default is ``False``
42-
pass_job_queue (optional[bool]): If the callback should be passed the job queue as a
43-
keyword argument called ``job_queue``. It can be used to schedule new jobs.
44-
Default is ``False``
39+
pass_update_queue (optional[bool]): If set to ``True``, a keyword argument called
40+
``update_queue`` will be passed to the callback function. It will be the ``Queue``
41+
instance used by the ``Updater`` and ``Dispatcher`` that contains new updates which can
42+
be used to insert updates. Default is ``False``.
43+
pass_job_queue (optional[bool]): If set to ``True``, a keyword argument called
44+
``job_queue`` will be passed to the callback function. It will be a ``JobQueue``
45+
instance created by the ``Updater`` which can be used to schedule new jobs.
46+
Default is ``False``.
4547
"""
4648

4749
def __init__(self,

telegram/ext/stringregexhandler.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,14 @@ class StringRegexHandler(Handler):
4444
pass_groupdict (optional[bool]): If the callback should be passed the
4545
result of ``re.match(pattern, update).groupdict()`` as a keyword
4646
argument called ``groupdict``. Default is ``False``
47-
pass_update_queue (optional[bool]): If the handler should be passed the
48-
update queue as a keyword argument called ``update_queue``. It can
49-
be used to insert updates. Default is ``False``
50-
pass_job_queue (optional[bool]): If the callback should be passed the job queue as a
51-
keyword argument called ``job_queue``. It can be used to schedule new jobs.
52-
Default is ``False``
47+
pass_update_queue (optional[bool]): If set to ``True``, a keyword argument called
48+
``update_queue`` will be passed to the callback function. It will be the ``Queue``
49+
instance used by the ``Updater`` and ``Dispatcher`` that contains new updates which can
50+
be used to insert updates. Default is ``False``.
51+
pass_job_queue (optional[bool]): If set to ``True``, a keyword argument called
52+
``job_queue`` will be passed to the callback function. It will be a ``JobQueue``
53+
instance created by the ``Updater`` which can be used to schedule new jobs.
54+
Default is ``False``.
5355
"""
5456

5557
def __init__(self,

telegram/ext/typehandler.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,14 @@ class TypeHandler(Handler):
3434
has determined that an update should be processed by this handler.
3535
strict (optional[bool]): Use ``type`` instead of ``isinstance``.
3636
Default is ``False``
37-
pass_update_queue (optional[bool]): If the handler should be passed the
38-
update queue as a keyword argument called ``update_queue``. It can
39-
be used to insert updates. Default is ``False``
40-
pass_job_queue (optional[bool]): If the callback should be passed the job queue as a
41-
keyword argument called ``job_queue``. It can be used to schedule new jobs.
42-
Default is ``False``
37+
pass_update_queue (optional[bool]): If set to ``True``, a keyword argument called
38+
``update_queue`` will be passed to the callback function. It will be the ``Queue``
39+
instance used by the ``Updater`` and ``Dispatcher`` that contains new updates which can
40+
be used to insert updates. Default is ``False``.
41+
pass_job_queue (optional[bool]): If set to ``True``, a keyword argument called
42+
``job_queue`` will be passed to the callback function. It will be a ``JobQueue``
43+
instance created by the ``Updater`` which can be used to schedule new jobs.
44+
Default is ``False``.
4345
"""
4446

4547
def __init__(self,

0 commit comments

Comments
 (0)