From ef0944047e50d0f5229b799c278aa13d6d2d9707 Mon Sep 17 00:00:00 2001 From: Andrin S <65789180+Puncher1@users.noreply.github.com> Date: Sat, 21 Oct 2023 15:32:47 +0200 Subject: [PATCH] Fix SKU return type and documentation --- discord/http.py | 2 +- discord/sku.py | 6 +++--- docs/api.rst | 16 ++++++++-------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/discord/http.py b/discord/http.py index 764b445ff..0208d0922 100644 --- a/discord/http.py +++ b/discord/http.py @@ -2441,7 +2441,7 @@ class HTTPClient: json=payload, ) - def delete_entitlement(self, application_id: Snowflake, entitlement_id: Snowflake) -> Response[sku.Entitlement]: + def delete_entitlement(self, application_id: Snowflake, entitlement_id: Snowflake) -> Response[None]: return self.request( Route( 'DELETE', diff --git a/discord/sku.py b/discord/sku.py index f18d92e03..0125c5734 100644 --- a/discord/sku.py +++ b/discord/sku.py @@ -92,7 +92,7 @@ class SKU: @property def flags(self) -> SKUFlags: - """Returns the flags of the SKU.""" + """:class:`SKUFlags`: Returns the flags of the SKU.""" return SKUFlags._from_value(self._flags) @property @@ -158,14 +158,14 @@ class Entitlement: @property def user(self) -> Optional[User]: - """The user that is granted access to the entitlement""" + """Optional[:class:`User`]: The user that is granted access to the entitlement.""" if self.user_id is None: return None return self._state.get_user(self.user_id) @property def guild(self) -> Optional[Guild]: - """The guild that is granted access to the entitlement""" + """Optional[:class:`Guild`]: The guild that is granted access to the entitlement.""" return self._state._get_guild(self.guild_id) @property diff --git a/docs/api.rst b/docs/api.rst index 1438c21ed..8805dc046 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -4804,14 +4804,6 @@ SKU .. autoclass:: SKU() :members: -SKUFlags -~~~~~~~~~~~ - -.. attributetable:: SKUFlags - -.. autoclass:: SKUFlags() - :members: - Entitlement ~~~~~~~~~~~ @@ -5189,6 +5181,14 @@ RoleFlags .. autoclass:: RoleFlags :members: +SKUFlags +~~~~~~~~~~~ + +.. attributetable:: SKUFlags + +.. autoclass:: SKUFlags() + :members: + ForumTag ~~~~~~~~~