Documentation Improvements (#4217)

Co-authored-by: poolitzer <github@poolitzer.eu>
This commit is contained in:
Bibo-Joshi 2024-05-20 15:53:04 +02:00 committed by GitHub
parent b496fabf62
commit 7d952d8707
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 17 additions and 15 deletions

View file

@ -157,7 +157,7 @@ Check-list for PRs
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. 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.
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. 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.
- 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) - 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)
- Created new or adapted existing unit tests - Created new or adapted existing unit tests
- Documented code changes according to the `CSI standard <https://standards.mousepawmedia.com/en/stable/csi.html>`__ - Documented code changes according to the `CSI standard <https://standards.mousepawmedia.com/en/stable/csi.html>`__
- Added myself alphabetically to ``AUTHORS.rst`` (optional) - Added myself alphabetically to ``AUTHORS.rst`` (optional)
@ -276,7 +276,7 @@ This gives us the flexibility to re-order arguments and more importantly
to add new required arguments. It's also more explicit and easier to read. to add new required arguments. It's also more explicit and easier to read.
.. _`Code of Conduct`: https://www.python.org/psf/conduct/ .. _`Code of Conduct`: https://policies.python.org/python.org/code-of-conduct/
.. _`issue tracker`: https://github.com/python-telegram-bot/python-telegram-bot/issues .. _`issue tracker`: https://github.com/python-telegram-bot/python-telegram-bot/issues
.. _`Telegram group`: https://telegram.me/pythontelegrambotgroup .. _`Telegram group`: https://telegram.me/pythontelegrambotgroup
.. _`PEP 8 Style Guide`: https://peps.python.org/pep-0008/ .. _`PEP 8 Style Guide`: https://peps.python.org/pep-0008/

View file

@ -13,6 +13,8 @@ body:
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. 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.
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.
- type: textarea - type: textarea
id: issue-faced id: issue-faced
attributes: attributes:

View file

@ -71,7 +71,7 @@ class Birthdate(TelegramObject):
self._freeze() self._freeze()
def to_date(self, year: Optional[int] = None) -> date: def to_date(self, year: Optional[int] = None) -> date:
"""Return the birthdate as a datetime object. """Return the birthdate as a date object.
.. versionchanged:: NEXT.VERSION .. versionchanged:: NEXT.VERSION
Now returns a :obj:`datetime.date` object instead of a :obj:`datetime.datetime` object, Now returns a :obj:`datetime.date` object instead of a :obj:`datetime.datetime` object,

View file

@ -260,8 +260,8 @@ class Chat(TelegramObject):
In accordance to Bot API 7.3, this attribute will be moved to In accordance to Bot API 7.3, this attribute will be moved to
:class:`telegram.ChatFullInfo`. :class:`telegram.ChatFullInfo`.
join_by_request (:obj:`bool`, optional): :obj:`True`, if all users directly joining the join_by_request (:obj:`bool`, optional): :obj:`True`, if all users directly joining the
supergroup need to be approved by supergroup administrators. Returned only in supergroup without using an invite link need to be approved by supergroup
:meth:`telegram.Bot.get_chat`. administrators. Returned only in :meth:`telegram.Bot.get_chat`.
.. versionadded:: 20.0 .. versionadded:: 20.0
@ -563,9 +563,9 @@ class Chat(TelegramObject):
.. deprecated:: NEXT.VERSION .. deprecated:: NEXT.VERSION
In accordance to Bot API 7.3, this attribute will be moved to In accordance to Bot API 7.3, this attribute will be moved to
:class:`telegram.ChatFullInfo`. :class:`telegram.ChatFullInfo`.
join_by_request (:obj:`bool`): Optional. :obj:`True`, if all users directly join_by_request (:obj:`bool`): Optional. :obj:`True`, if all users directly joining the
joining the supergroup need to be approved by supergroup administrators. Returned only supergroup without using an invite link need to be approved by supergroup
in :meth:`telegram.Bot.get_chat`. administrators. Returned only in :meth:`telegram.Bot.get_chat`.
.. versionadded:: 20.0 .. versionadded:: 20.0

View file

@ -141,8 +141,8 @@ class Update(TelegramObject):
.. versionadded:: 21.1 .. versionadded:: 21.1
business_message (:class:`telegram.Message`, optional): New non-service message business_message (:class:`telegram.Message`, optional): New message from a connected
from a connected business account. business account.
.. versionadded:: 21.1 .. versionadded:: 21.1
@ -249,8 +249,8 @@ class Update(TelegramObject):
.. versionadded:: 21.1 .. versionadded:: 21.1
business_message (:class:`telegram.Message`): Optional. New non-service message business_message (:class:`telegram.Message`): Optional. New message from a connected
from a connected business account. business account.
.. versionadded:: 21.1 .. versionadded:: 21.1

View file

@ -49,7 +49,7 @@ class StringCommandHandler(BaseHandler[str, CCT]):
called when :meth:`check_update` has determined that an update should be processed by called when :meth:`check_update` has determined that an update should be processed by
this handler. Callback signature:: this handler. Callback signature::
async def callback(update: Update, context: CallbackContext) async def callback(update: str, context: CallbackContext)
The return value of the callback is usually ignored except for the special case of The return value of the callback is usually ignored except for the special case of
:class:`telegram.ext.ConversationHandler`. :class:`telegram.ext.ConversationHandler`.

View file

@ -52,7 +52,7 @@ class StringRegexHandler(BaseHandler[str, CCT]):
called when :meth:`check_update` has determined that an update should be processed by called when :meth:`check_update` has determined that an update should be processed by
this handler. Callback signature:: this handler. Callback signature::
async def callback(update: Update, context: CallbackContext) async def callback(update: str, context: CallbackContext)
The return value of the callback is usually ignored except for the special case of The return value of the callback is usually ignored except for the special case of
:class:`telegram.ext.ConversationHandler`. :class:`telegram.ext.ConversationHandler`.

View file

@ -43,7 +43,7 @@ class TypeHandler(BaseHandler[UT, CCT]):
called when :meth:`check_update` has determined that an update should be processed by called when :meth:`check_update` has determined that an update should be processed by
this handler. Callback signature:: this handler. Callback signature::
async def callback(update: Update, context: CallbackContext) async def callback(update: object, context: CallbackContext)
The return value of the callback is usually ignored except for the special case of The return value of the callback is usually ignored except for the special case of
:class:`telegram.ext.ConversationHandler`. :class:`telegram.ext.ConversationHandler`.