From 2bd3f2a65aadde1589f2dcd2e6893173d4dead91 Mon Sep 17 00:00:00 2001 From: Bibo-Joshi Date: Sat, 25 Apr 2020 12:34:13 +0200 Subject: [PATCH] Render Notes correctly (#1914) * Renders Notes in JobQueues docs correctly * Notes: -> Note: --- telegram/bot.py | 2 +- telegram/ext/jobqueue.py | 6 +++--- telegram/ext/messagequeue.py | 2 +- telegram/files/sticker.py | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/telegram/bot.py b/telegram/bot.py index 253f2cd7b..190658e4a 100644 --- a/telegram/bot.py +++ b/telegram/bot.py @@ -2103,7 +2103,7 @@ class Bot(TelegramObject): updates may be received for a short period of time. **kwargs (:obj:`dict`): Arbitrary keyword arguments. - Notes: + Note: 1. This method will not work if an outgoing webhook is set up. 2. In order to avoid getting duplicate updates, recalculate offset after each server response. diff --git a/telegram/ext/jobqueue.py b/telegram/ext/jobqueue.py index 03598db96..d6716dab2 100644 --- a/telegram/ext/jobqueue.py +++ b/telegram/ext/jobqueue.py @@ -203,7 +203,7 @@ class JobQueue(object): :class:`telegram.ext.Job`: The new ``Job`` instance that has been added to the job queue. - Notes: + Note: `interval` is always respected "as-is". That means that if DST changes during that interval, the job might not run at the time one would expect. It is always recommended to pin servers to UTC time, then time related behaviour can always be expected. @@ -246,7 +246,7 @@ class JobQueue(object): :class:`telegram.ext.Job`: The new ``Job`` instance that has been added to the job queue. - Notes: + Note: Daily is just an alias for "24 Hours". That means that if DST changes during that interval, the job might not run at the time one would expect. It is always recommended to pin servers to UTC time, then time related behaviour can always be expected. @@ -509,7 +509,7 @@ class Job(object): @property def next_t(self): """ - ::obj:`datetime.datetime`: Datetime for the next job execution. + :obj:`datetime.datetime`: Datetime for the next job execution. Datetime is localized according to :attr:`tzinfo`. If job is removed or already ran it equals to ``None``. diff --git a/telegram/ext/messagequeue.py b/telegram/ext/messagequeue.py index f0dea5f17..29b3200ee 100644 --- a/telegram/ext/messagequeue.py +++ b/telegram/ext/messagequeue.py @@ -249,7 +249,7 @@ class MessageQueue(object): ``DelayQueue`` (if set to ``False``), resulting in needed delays to avoid hitting specified limits. Defaults to ``False``. - Notes: + Note: Method is designed to accept ``telegram.utils.promise.Promise`` as ``promise`` argument, but other callables could be used too. For example, lambdas or simple functions could be used to wrap original func to be called with needed args. In that diff --git a/telegram/files/sticker.py b/telegram/files/sticker.py index 8249cbcbe..c8d6518bf 100644 --- a/telegram/files/sticker.py +++ b/telegram/files/sticker.py @@ -195,7 +195,7 @@ class MaskPosition(TelegramObject): size, from top to bottom. scale (:obj:`float`): Mask scaling coefficient. For example, 2.0 means double size. - Notes: + Note: :attr:`type` should be one of the following: `forehead`, `eyes`, `mouth` or `chin`. You can use the classconstants for those.