diff --git a/changelog.d/2972.docs.rst b/changelog.d/2972.docs.rst new file mode 100644 index 000000000..a734cae9a --- /dev/null +++ b/changelog.d/2972.docs.rst @@ -0,0 +1 @@ +Driver docs no longer show twice. \ No newline at end of file diff --git a/changelog.d/3035.docs.rst b/changelog.d/3035.docs.rst new file mode 100644 index 000000000..8e2fc91c2 --- /dev/null +++ b/changelog.d/3035.docs.rst @@ -0,0 +1 @@ +Add proper docstrings to enums that show in drivers docs. \ No newline at end of file diff --git a/docs/framework_config.rst b/docs/framework_config.rst index 28857b227..c1c382f4f 100644 --- a/docs/framework_config.rst +++ b/docs/framework_config.rst @@ -443,7 +443,12 @@ Value Driver Reference **************** -.. automodule:: redbot.core.drivers +.. autofunction:: redbot.core.drivers.get_driver + +.. autoclass:: redbot.core.drivers.BackendType + :members: + +.. autoclass:: redbot.core.drivers.ConfigCategory :members: Base Driver @@ -456,3 +461,7 @@ JSON Driver .. autoclass:: redbot.core.drivers.JsonDriver :members: +Postgres Driver +^^^^^^^^^^^^^^^ +.. autoclass:: redbot.core.drivers.PostgresDriver + :members: diff --git a/redbot/core/drivers/__init__.py b/redbot/core/drivers/__init__.py index 125714b74..7b650b1be 100644 --- a/redbot/core/drivers/__init__.py +++ b/redbot/core/drivers/__init__.py @@ -18,9 +18,13 @@ __all__ = [ class BackendType(enum.Enum): + """Represents storage backend type.""" + + #: JSON storage backend. JSON = "JSON" + #: Postgres storage backend. POSTGRES = "Postgres" - # Dead drivrs below retained for error handling. + # Dead drivers below retained for error handling. MONGOV1 = "MongoDB" MONGO = "MongoDBV2" diff --git a/redbot/core/drivers/base.py b/redbot/core/drivers/base.py index 8d8ed8a36..cc408b131 100644 --- a/redbot/core/drivers/base.py +++ b/redbot/core/drivers/base.py @@ -6,11 +6,19 @@ __all__ = ["BaseDriver", "IdentifierData", "ConfigCategory"] class ConfigCategory(str, enum.Enum): + """Represents config category.""" + + #: Global category. GLOBAL = "GLOBAL" + #: Guild category. GUILD = "GUILD" + #: Channel category. CHANNEL = "TEXTCHANNEL" + #: Role category. ROLE = "ROLE" + #: User category. USER = "USER" + #: Member category. MEMBER = "MEMBER" @classmethod