Skip to content

Commit 7d952d8

Browse files
Documentation Improvements (#4217)
Co-authored-by: poolitzer <[email protected]>
1 parent b496fab commit 7d952d8

File tree

8 files changed

+17
-15
lines changed

8 files changed

+17
-15
lines changed

.github/CONTRIBUTING.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ Check-list for PRs
157157
This checklist is a non-exhaustive reminder of things that should be done before a PR is merged, both for you as contributor and for the maintainers.
158158
Feel free to copy (parts of) the checklist to the PR description to remind you or the maintainers of open points or if you have questions on anything.
159159

160-
- Added ``.. versionadded:: NEXT.VERSION``, ``.. versionchanged:: NEXT.VERSION`` or ``.. deprecated:: NEXT.VERSION`` to the docstrings for user facing changes (for methods/class descriptions, arguments and attributes)
160+
- Added ``.. versionadded:: NEXT.VERSION``, ``.. versionchanged:: NEXT.VERSION``, ``.. deprecated:: NEXT.VERSION`` or ``.. versionremoved:: NEXT.VERSION`` to the docstrings for user facing changes (for methods/class descriptions, arguments and attributes)
161161
- Created new or adapted existing unit tests
162162
- Documented code changes according to the `CSI standard <https://standards.mousepawmedia.com/en/stable/csi.html>`__
163163
- Added myself alphabetically to ``AUTHORS.rst`` (optional)
@@ -276,7 +276,7 @@ This gives us the flexibility to re-order arguments and more importantly
276276
to add new required arguments. It's also more explicit and easier to read.
277277

278278

279-
.. _`Code of Conduct`: https://www.python.org/psf/conduct/
279+
.. _`Code of Conduct`: https://policies.python.org/python.org/code-of-conduct/
280280
.. _`issue tracker`: https://github.com/python-telegram-bot/python-telegram-bot/issues
281281
.. _`Telegram group`: https://telegram.me/pythontelegrambotgroup
282282
.. _`PEP 8 Style Guide`: https://peps.python.org/pep-0008/

.github/ISSUE_TEMPLATE/question.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ body:
1212
To make it easier for us to help you, please read this [article](https://github.com/python-telegram-bot/python-telegram-bot/wiki/Ask-Right).
1313
1414
Please mind that there is also a users' [Telegram group](https://t.me/pythontelegrambotgroup) for questions about the library. Questions asked there might be answered quicker than here. Moreover, [GitHub Discussions](https://github.com/python-telegram-bot/python-telegram-bot/discussions) offer a slightly better format to discuss usage questions.
15+
16+
If you have asked the same question elsewhere (e.g. the [Telegram group](https://t.me/pythontelegrambotgroup) or [StackOverflow](https://stackoverflow.com/questions/tagged/python-telegram-bot)), provide a link to that thread.
1517
1618
- type: textarea
1719
id: issue-faced

telegram/_birthdate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def __init__(
7171
self._freeze()
7272

7373
def to_date(self, year: Optional[int] = None) -> date:
74-
"""Return the birthdate as a datetime object.
74+
"""Return the birthdate as a date object.
7575
7676
.. versionchanged:: NEXT.VERSION
7777
Now returns a :obj:`datetime.date` object instead of a :obj:`datetime.datetime` object,

telegram/_chat.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,8 @@ class Chat(TelegramObject):
260260
In accordance to Bot API 7.3, this attribute will be moved to
261261
:class:`telegram.ChatFullInfo`.
262262
join_by_request (:obj:`bool`, optional): :obj:`True`, if all users directly joining the
263-
supergroup need to be approved by supergroup administrators. Returned only in
264-
:meth:`telegram.Bot.get_chat`.
263+
supergroup without using an invite link need to be approved by supergroup
264+
administrators. Returned only in :meth:`telegram.Bot.get_chat`.
265265
266266
.. versionadded:: 20.0
267267
@@ -563,9 +563,9 @@ class Chat(TelegramObject):
563563
.. deprecated:: NEXT.VERSION
564564
In accordance to Bot API 7.3, this attribute will be moved to
565565
:class:`telegram.ChatFullInfo`.
566-
join_by_request (:obj:`bool`): Optional. :obj:`True`, if all users directly
567-
joining the supergroup need to be approved by supergroup administrators. Returned only
568-
in :meth:`telegram.Bot.get_chat`.
566+
join_by_request (:obj:`bool`): Optional. :obj:`True`, if all users directly joining the
567+
supergroup without using an invite link need to be approved by supergroup
568+
administrators. Returned only in :meth:`telegram.Bot.get_chat`.
569569
570570
.. versionadded:: 20.0
571571

telegram/_update.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ class Update(TelegramObject):
141141
142142
.. versionadded:: 21.1
143143
144-
business_message (:class:`telegram.Message`, optional): New non-service message
145-
from a connected business account.
144+
business_message (:class:`telegram.Message`, optional): New message from a connected
145+
business account.
146146
147147
.. versionadded:: 21.1
148148
@@ -249,8 +249,8 @@ class Update(TelegramObject):
249249
250250
.. versionadded:: 21.1
251251
252-
business_message (:class:`telegram.Message`): Optional. New non-service message
253-
from a connected business account.
252+
business_message (:class:`telegram.Message`): Optional. New message from a connected
253+
business account.
254254
255255
.. versionadded:: 21.1
256256

telegram/ext/_handlers/stringcommandhandler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class StringCommandHandler(BaseHandler[str, CCT]):
4949
called when :meth:`check_update` has determined that an update should be processed by
5050
this handler. Callback signature::
5151
52-
async def callback(update: Update, context: CallbackContext)
52+
async def callback(update: str, context: CallbackContext)
5353
5454
The return value of the callback is usually ignored except for the special case of
5555
:class:`telegram.ext.ConversationHandler`.

telegram/ext/_handlers/stringregexhandler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class StringRegexHandler(BaseHandler[str, CCT]):
5252
called when :meth:`check_update` has determined that an update should be processed by
5353
this handler. Callback signature::
5454
55-
async def callback(update: Update, context: CallbackContext)
55+
async def callback(update: str, context: CallbackContext)
5656
5757
The return value of the callback is usually ignored except for the special case of
5858
:class:`telegram.ext.ConversationHandler`.

telegram/ext/_handlers/typehandler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class TypeHandler(BaseHandler[UT, CCT]):
4343
called when :meth:`check_update` has determined that an update should be processed by
4444
this handler. Callback signature::
4545
46-
async def callback(update: Update, context: CallbackContext)
46+
async def callback(update: object, context: CallbackContext)
4747
4848
The return value of the callback is usually ignored except for the special case of
4949
:class:`telegram.ext.ConversationHandler`.

0 commit comments

Comments
 (0)