From 324b70dd2eff458729acfa88938862478de41be1 Mon Sep 17 00:00:00 2001 From: grey-cat-1908 Date: Sun, 4 Jun 2023 13:40:59 +0300 Subject: [PATCH] better docs for exceptions, UserProfile --- boticordpy/types.py | 4 +--- docs/source/api/exceptions.rst | 17 +++++++++++++++-- docs/source/api/types.rst | 2 ++ 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/boticordpy/types.py b/boticordpy/types.py index 66667d3..4d455c9 100644 --- a/boticordpy/types.py +++ b/boticordpy/types.py @@ -817,9 +817,7 @@ class ResourceBot(APIObjectBase): @dataclass(repr=False) class UserProfile(PartialUser): - """Information about user's profile from BotiCord. - - It has all from PartialUser and some more params: 'bots', 'servers', 'badges'""" + """Information about user's profile from BotiCord.'""" badges: List[UserBadge] """User's badges list.""" diff --git a/docs/source/api/exceptions.rst b/docs/source/api/exceptions.rst index 92ffe2c..1767b4a 100644 --- a/docs/source/api/exceptions.rst +++ b/docs/source/api/exceptions.rst @@ -1,7 +1,20 @@ +.. currentmodule:: boticordpy.exceptions + ########################## Exceptions API Reference ########################## -.. automodule:: boticordpy.exceptions +.. autoclass:: BoticordException + :members: + +.. autoclass:: InternalException + :members: + +.. autoclass:: HTTPException + :members: + +.. autoclass:: StatusCodes + :members: + +.. autoclass:: HTTPErrors :members: - :inherited-members: diff --git a/docs/source/api/types.rst b/docs/source/api/types.rst index c7cb70b..90945e4 100644 --- a/docs/source/api/types.rst +++ b/docs/source/api/types.rst @@ -51,3 +51,5 @@ Users .. autoclass:: UserProfile :members: + :exclude-members: to_dict + :inherited-members: