mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 03:08:55 -05:00
[Docs] Add missing descriptions for function returns (#3054)
* docs: add missing descriptions for function returns * chore(changelog): add towncrier entry
This commit is contained in:
parent
a3b6aafaca
commit
8267ad9aab
1
changelog.d/3054.docs.rst
Normal file
1
changelog.d/3054.docs.rst
Normal file
@ -0,0 +1 @@
|
||||
Add missing descriptions for function returns.
|
||||
@ -612,7 +612,7 @@ class RepoManager:
|
||||
Returns
|
||||
-------
|
||||
`tuple` of `str`
|
||||
|
||||
Repo names.
|
||||
"""
|
||||
# noinspection PyTypeChecker
|
||||
return tuple(self._repos.keys())
|
||||
|
||||
@ -303,10 +303,12 @@ class RedBase(commands.GroupMixin, commands.bot.BotBase, RPCMixin): # pylint: d
|
||||
Parameters
|
||||
----------
|
||||
location : `discord.abc.Messageable`
|
||||
Location to check embed color for.
|
||||
|
||||
Returns
|
||||
-------
|
||||
discord.Color
|
||||
Embed color for the provided location.
|
||||
"""
|
||||
|
||||
guild = getattr(location, "guild", None)
|
||||
@ -493,6 +495,7 @@ class RedBase(commands.GroupMixin, commands.bot.BotBase, RPCMixin): # pylint: d
|
||||
Parameters
|
||||
----------
|
||||
service_name: str
|
||||
The service to get tokens for.
|
||||
|
||||
Returns
|
||||
-------
|
||||
|
||||
@ -1275,6 +1275,7 @@ class Config:
|
||||
Returns
|
||||
-------
|
||||
asyncio.Lock
|
||||
A lock for all guild data.
|
||||
"""
|
||||
return self.get_custom_lock(self.GUILD)
|
||||
|
||||
@ -1284,6 +1285,7 @@ class Config:
|
||||
Returns
|
||||
-------
|
||||
asyncio.Lock
|
||||
A lock for all channels data.
|
||||
"""
|
||||
return self.get_custom_lock(self.CHANNEL)
|
||||
|
||||
@ -1293,6 +1295,7 @@ class Config:
|
||||
Returns
|
||||
-------
|
||||
asyncio.Lock
|
||||
A lock for all roles data.
|
||||
"""
|
||||
return self.get_custom_lock(self.ROLE)
|
||||
|
||||
@ -1302,6 +1305,7 @@ class Config:
|
||||
Returns
|
||||
-------
|
||||
asyncio.Lock
|
||||
A lock for all user data.
|
||||
"""
|
||||
return self.get_custom_lock(self.USER)
|
||||
|
||||
@ -1317,6 +1321,9 @@ class Config:
|
||||
Returns
|
||||
-------
|
||||
asyncio.Lock
|
||||
A lock for all member data for the given guild.
|
||||
If ``guild`` is omitted this will give a lock
|
||||
for all data for all members in all guilds.
|
||||
"""
|
||||
if guild is None:
|
||||
return self.get_custom_lock(self.GUILD)
|
||||
@ -1342,6 +1349,7 @@ class Config:
|
||||
Returns
|
||||
-------
|
||||
asyncio.Lock
|
||||
A lock for all data in a custom scope with given group identifier.
|
||||
"""
|
||||
try:
|
||||
pkey_len, is_custom = ConfigCategory.get_pkey_info(
|
||||
|
||||
@ -214,6 +214,7 @@ def storage_type() -> str:
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
Storage type.
|
||||
"""
|
||||
try:
|
||||
return basic_config["STORAGE_TYPE"]
|
||||
@ -229,5 +230,6 @@ def storage_details() -> dict:
|
||||
Returns
|
||||
-------
|
||||
dict
|
||||
Storage details.
|
||||
"""
|
||||
return basic_config.get("STORAGE_DETAILS", {})
|
||||
|
||||
@ -113,6 +113,7 @@ class MongoDriver(BaseDriver):
|
||||
attributes of :py:class:`core.config.Config`.
|
||||
|
||||
:param str category:
|
||||
The group identifier of a category.
|
||||
:return:
|
||||
PyMongo collection object.
|
||||
"""
|
||||
|
||||
@ -561,7 +561,7 @@ class CaseType:
|
||||
Returns
|
||||
-------
|
||||
CaseType
|
||||
|
||||
The case type object created from given data.
|
||||
"""
|
||||
data_copy = data.copy()
|
||||
data_copy.pop("name", None)
|
||||
@ -808,6 +808,7 @@ async def get_casetype(name: str, guild: Optional[discord.Guild] = None) -> Opti
|
||||
Returns
|
||||
-------
|
||||
Optional[CaseType]
|
||||
Case type with provided name. If such case type doesn't exist this will be `None`.
|
||||
"""
|
||||
data = await _conf.custom(_CASETYPES, name).all()
|
||||
if not data:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user