Make py:obj default Sphinx's role

This commit is contained in:
Lonami Exo
2018-03-28 16:03:47 +02:00
parent dcb7820c5f
commit 395e702586
7 changed files with 164 additions and 162 deletions

View File

@@ -42,6 +42,9 @@ extensions = [
'custom_roles'
]
# Change the default role so we can avoid prefixing everything with :obj:
default_role = "py:obj"
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

View File

@@ -101,7 +101,7 @@ Retrieving all chat members (channels too)
******************************************
You can use
:obj:`client.get_participants <telethon.telegram_client.TelegramClient.get_participants>``
`client.get_participants <telethon.telegram_client.TelegramClient.get_participants>`
to retrieve the participants (click it to see the relevant parameters).
Most of the time you will just need ``client.get_participants(entity)``.

View File

@@ -12,7 +12,7 @@ Forwarding messages
*******************
This request is available as a friendly method through
:obj:`client.forward_messages <telethon.telegram_client.TelegramClient.forward_messages>``,
`client.forward_messages <telethon.telegram_client.TelegramClient.forward_messages>`,
and can be used like shown below:
.. code-block:: python