Rework documentation to not duplicate inherited members.

This will probably be reverted in 1 week.
This commit is contained in:
Rapptz 2018-10-03 05:45:30 -04:00
parent 60d86b6c1a
commit 96981210b3
5 changed files with 28 additions and 44 deletions

View File

@ -45,6 +45,11 @@ async def _single_delete_strategy(messages):
class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable): class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable):
"""Represents a Discord guild text channel. """Represents a Discord guild text channel.
**Inherited Classes**
- :class:`discord.abc.Messageable`
- :class:`discord.abc.GuildChannel`
.. container:: operations .. container:: operations
.. describe:: x == y .. describe:: x == y
@ -388,6 +393,11 @@ class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable):
class VoiceChannel(discord.abc.Connectable, discord.abc.GuildChannel, Hashable): class VoiceChannel(discord.abc.Connectable, discord.abc.GuildChannel, Hashable):
"""Represents a Discord guild voice channel. """Represents a Discord guild voice channel.
**Inherited Classes**
- :class:`discord.abc.Connectable`
- :class:`discord.abc.GuildChannel`
.. container:: operations .. container:: operations
.. describe:: x == y .. describe:: x == y
@ -615,6 +625,10 @@ class CategoryChannel(discord.abc.GuildChannel, Hashable):
class DMChannel(discord.abc.Messageable, Hashable): class DMChannel(discord.abc.Messageable, Hashable):
"""Represents a Discord direct message channel. """Represents a Discord direct message channel.
**Inherited Classes**
- :class:`discord.abc.Messageable`
.. container:: operations .. container:: operations
.. describe:: x == y .. describe:: x == y
@ -697,6 +711,10 @@ class DMChannel(discord.abc.Messageable, Hashable):
class GroupChannel(discord.abc.Messageable, Hashable): class GroupChannel(discord.abc.Messageable, Hashable):
"""Represents a Discord group channel. """Represents a Discord group channel.
**Inherited Classes**
- :class:`discord.abc.Messageable`
.. container:: operations .. container:: operations
.. describe:: x == y .. describe:: x == y

View File

@ -34,7 +34,9 @@ class Context(discord.abc.Messageable):
the invocation context. This class is not created manually and is instead the invocation context. This class is not created manually and is instead
passed around to commands as the first parameter. passed around to commands as the first parameter.
This class implements the :class:`abc.Messageable` ABC. **Inherited Classes**
- :class:`discord.abc.Messageable`
Attributes Attributes
----------- -----------

View File

@ -112,7 +112,9 @@ _BaseUser = discord.abc.User
class Member(discord.abc.Messageable, _BaseUser): class Member(discord.abc.Messageable, _BaseUser):
"""Represents a Discord member to a :class:`Guild`. """Represents a Discord member to a :class:`Guild`.
This implements a lot of the functionality of :class:`User`. **Inherited Classes**
- :class:`discord.abc.Messageable`
.. container:: operations .. container:: operations

View File

@ -479,6 +479,10 @@ class ClientUser(BaseUser):
class User(BaseUser, discord.abc.Messageable): class User(BaseUser, discord.abc.Messageable):
"""Represents a Discord user. """Represents a Discord user.
**Inherited Classes**
- :class:`discord.abc.Messageable`
.. container:: operations .. container:: operations
.. describe:: x == y .. describe:: x == y

View File

@ -1846,7 +1846,6 @@ ClientUser
.. autoclass:: ClientUser() .. autoclass:: ClientUser()
:members: :members:
:inherited-members:
Relationship Relationship
~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~
@ -1859,14 +1858,6 @@ User
.. autoclass:: User() .. autoclass:: User()
:members: :members:
:inherited-members:
:exclude-members: history, typing
.. autocomethod:: history
:async-for:
.. autocomethod:: typing
:async-with:
Attachment Attachment
~~~~~~~~~~~ ~~~~~~~~~~~
@ -1917,14 +1908,6 @@ Member
.. autoclass:: Member() .. autoclass:: Member()
:members: :members:
:inherited-members:
:exclude-members: history, typing
.. autocomethod:: history
:async-for:
.. autocomethod:: typing
:async-with:
Spotify Spotify
~~~~~~~~ ~~~~~~~~
@ -1961,56 +1944,31 @@ TextChannel
.. autoclass:: TextChannel() .. autoclass:: TextChannel()
:members: :members:
:inherited-members:
:exclude-members: history, typing
.. autocomethod:: history
:async-for:
.. autocomethod:: typing
:async-with:
VoiceChannel VoiceChannel
~~~~~~~~~~~~~ ~~~~~~~~~~~~~
.. autoclass:: VoiceChannel() .. autoclass:: VoiceChannel()
:members: :members:
:inherited-members:
CategoryChannel CategoryChannel
~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~
.. autoclass:: CategoryChannel() .. autoclass:: CategoryChannel()
:members: :members:
:inherited-members:
DMChannel DMChannel
~~~~~~~~~ ~~~~~~~~~
.. autoclass:: DMChannel() .. autoclass:: DMChannel()
:members: :members:
:inherited-members:
:exclude-members: history, typing
.. autocomethod:: history
:async-for:
.. autocomethod:: typing
:async-with:
GroupChannel GroupChannel
~~~~~~~~~~~~ ~~~~~~~~~~~~
.. autoclass:: GroupChannel() .. autoclass:: GroupChannel()
:members: :members:
:inherited-members:
:exclude-members: history, typing
.. autocomethod:: history
:async-for:
.. autocomethod:: typing
:async-with:
Invite Invite