Fix up the Sphinx strings causing warnings.
This commit is contained in:
parent
0352c80a17
commit
5c24e69cf2
@ -363,7 +363,7 @@ class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable):
|
||||
name: str
|
||||
The webhook's name.
|
||||
avatar: Optional[bytes]
|
||||
A *bytes-like* object representing the webhook's default avatar.
|
||||
A :term:`py:bytes-like object` representing the webhook's default avatar.
|
||||
This operates similarly to :meth:`~ClientUser.edit`.
|
||||
|
||||
Raises
|
||||
@ -877,7 +877,7 @@ class GroupChannel(discord.abc.Messageable, Hashable):
|
||||
The new name to change the group to.
|
||||
Could be ``None`` to remove the name.
|
||||
icon: Optional[bytes]
|
||||
A bytes-like object representing the new icon.
|
||||
A :term:`py:bytes-like object` representing the new icon.
|
||||
Could be ``None`` to remove the icon.
|
||||
|
||||
Raises
|
||||
|
@ -855,7 +855,7 @@ class Client:
|
||||
The region for the voice communication server.
|
||||
Defaults to :attr:`VoiceRegion.us_west`.
|
||||
icon: bytes
|
||||
The *bytes-like* object representing the icon. See :meth:`~ClientUser.edit`
|
||||
The :term:`py:bytes-like object` representing the icon. See :meth:`~ClientUser.edit`
|
||||
for more details on what is expected.
|
||||
|
||||
Raises
|
||||
|
@ -228,7 +228,7 @@ class Emoji(Hashable):
|
||||
await self._state.http.delete_custom_emoji(self.guild.id, self.id, reason=reason)
|
||||
|
||||
async def edit(self, *, name, roles=None, reason=None):
|
||||
"""|coro|
|
||||
r"""|coro|
|
||||
|
||||
Edits the custom emoji.
|
||||
|
||||
@ -240,7 +240,7 @@ class Emoji(Hashable):
|
||||
name: str
|
||||
The new emoji name.
|
||||
roles: Optional[list[:class:`Role`]]
|
||||
A :class:`list` of :class:`Role`s that can use this emoji. Leave empty to make it available to everyone.
|
||||
A :class:`list` of :class:`Role`\s that can use this emoji. Leave empty to make it available to everyone.
|
||||
reason: Optional[str]
|
||||
The reason for editing this emoji. Shows up on the audit log.
|
||||
|
||||
|
@ -688,10 +688,10 @@ class Guild(Hashable):
|
||||
name: str
|
||||
The new name of the guild.
|
||||
icon: bytes
|
||||
A *bytes-like* object representing the icon. Only PNG/JPEG supported.
|
||||
A :term:`py:bytes-like object` representing the icon. Only PNG/JPEG supported.
|
||||
Could be ``None`` to denote removal of the icon.
|
||||
splash: bytes
|
||||
A *bytes-like* object representing the invite splash.
|
||||
A :term:`py:bytes-like object` representing the invite splash.
|
||||
Only PNG/JPEG supported. Could be ``None`` to denote removing the
|
||||
splash. Only available for partnered guilds with ``INVITE_SPLASH``
|
||||
feature.
|
||||
@ -987,7 +987,7 @@ class Guild(Hashable):
|
||||
return result
|
||||
|
||||
async def create_custom_emoji(self, *, name, image, roles=None, reason=None):
|
||||
"""|coro|
|
||||
r"""|coro|
|
||||
|
||||
Creates a custom :class:`Emoji` for the guild.
|
||||
|
||||
@ -1003,10 +1003,10 @@ class Guild(Hashable):
|
||||
name: str
|
||||
The emoji name. Must be at least 2 characters.
|
||||
image: bytes
|
||||
The *bytes-like* object representing the image data to use.
|
||||
The :term:`py:bytes-like object` representing the image data to use.
|
||||
Only JPG and PNG images are supported.
|
||||
roles: Optional[list[:class:`Role`]]
|
||||
A :class:`list` of :class:`Role`s that can use this emoji. Leave empty to make it available to everyone.
|
||||
A :class:`list` of :class:`Role`\s that can use this emoji. Leave empty to make it available to everyone.
|
||||
reason: Optional[str]
|
||||
The reason for creating this emoji. Shows up on the audit log.
|
||||
|
||||
|
@ -54,8 +54,8 @@ class AudioSource:
|
||||
|
||||
Subclasses must implement this.
|
||||
|
||||
If the audio is complete, then returning an empty *bytes-like* object
|
||||
to signal this is the way to do so.
|
||||
If the audio is complete, then returning an empty
|
||||
:term:`py:bytes-like object` to signal this is the way to do so.
|
||||
|
||||
If :meth:`is_opus` method returns ``True``, then it must return
|
||||
20ms worth of Opus encoded audio. Otherwise, it must be 20ms
|
||||
|
@ -323,10 +323,10 @@ class ClientUser(BaseUser):
|
||||
|
||||
Note
|
||||
-----
|
||||
To upload an avatar, a *bytes-like object* must be passed in that
|
||||
To upload an avatar, a :term:`py:bytes-like object` must be passed in that
|
||||
represents the image being uploaded. If this is done through a file
|
||||
then the file must be opened via ``open('some_filename', 'rb')`` and
|
||||
the *bytes-like object* is given through the use of ``fp.read()``.
|
||||
the :term:`py:bytes-like object` is given through the use of ``fp.read()``.
|
||||
|
||||
The only image formats supported for uploading is JPEG and PNG.
|
||||
|
||||
@ -341,14 +341,14 @@ class ClientUser(BaseUser):
|
||||
email: str
|
||||
The new email you wish to change to.
|
||||
Only applicable to user accounts.
|
||||
Optional[:class:`HypeSquadHouse`]
|
||||
house: Optional[:class:`HypeSquadHouse`]
|
||||
The hypesquad house you wish to change to.
|
||||
Could be ``None`` to leave the current house.
|
||||
Only applicable to user accounts.
|
||||
username :str
|
||||
The new username you wish to change to.
|
||||
avatar: bytes
|
||||
A *bytes-like object* representing the image to upload.
|
||||
A :term:`py:bytes-like object` representing the image to upload.
|
||||
Could be ``None`` to denote no avatar.
|
||||
|
||||
Raises
|
||||
|
@ -392,7 +392,7 @@ class VoiceClient:
|
||||
Parameters
|
||||
----------
|
||||
data: bytes
|
||||
The *bytes-like object* denoting PCM or Opus voice data.
|
||||
The :term:`py:bytes-like object` denoting PCM or Opus voice data.
|
||||
encode: bool
|
||||
Indicates if ``data`` should be encoded into Opus.
|
||||
|
||||
|
@ -525,7 +525,7 @@ class Webhook:
|
||||
name: Optional[str]
|
||||
The webhook's new default name.
|
||||
avatar: Optional[bytes]
|
||||
A *bytes-like* object representing the webhook's new default avatar.
|
||||
A :term:`py:bytes-like object` representing the webhook's new default avatar.
|
||||
|
||||
Raises
|
||||
-------
|
||||
|
@ -46,7 +46,7 @@ extlinks = {
|
||||
}
|
||||
|
||||
# Links used for cross-referencing stuff in other documentation
|
||||
intersphinx_mapping = {'python': ('https://docs.python.org/3', None)}
|
||||
intersphinx_mapping = {'py': ('https://docs.python.org/3', None)}
|
||||
|
||||
rst_prolog = """
|
||||
.. |coro| replace:: This function is a |corourl|_.
|
||||
@ -314,4 +314,4 @@ texinfo_documents = [
|
||||
def setup(app):
|
||||
app.add_javascript('custom.js')
|
||||
if app.config.language == 'ja':
|
||||
app.config.intersphinx_mapping['python'] = ('https://docs.python.org/ja/3', None)
|
||||
app.config.intersphinx_mapping['py'] = ('https://docs.python.org/ja/3', None)
|
||||
|
Loading…
x
Reference in New Issue
Block a user