[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:
jack1142 2019-10-22 04:41:35 +02:00 committed by Michael H
parent a3b6aafaca
commit 8267ad9aab
7 changed files with 20 additions and 4 deletions

View File

@ -0,0 +1 @@
Add missing descriptions for function returns.

View File

@ -612,7 +612,7 @@ class RepoManager:
Returns
-------
`tuple` of `str`
Repo names.
"""
# noinspection PyTypeChecker
return tuple(self._repos.keys())

View File

@ -287,7 +287,7 @@ class RedBase(commands.GroupMixin, commands.bot.BotBase, RPCMixin): # pylint: d
----------
guild : Optional[discord.Guild]
The guild you want prefixes for. Omit (or pass None) for the DM prefixes
Returns
-------
List[str]
@ -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
-------

View File

@ -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(

View File

@ -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", {})

View File

@ -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.
"""

View File

@ -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: