[V3 Downloader] Pagify cog list and typing fix (#1662)

* Cog list is now pagified

* Proper typing of Tuple

* Black formatting

* More Black formatting
This commit is contained in:
bobloy 2018-05-27 21:55:33 -04:00 committed by Kowlin
parent 706b04610d
commit 4028dd3009

View File

@ -371,7 +371,8 @@ class Downloader:
["+ {}: {}".format(c.name, c.short or "") for c in cogs]
)
await ctx.send(box(cogs, lang="diff"))
for page in pagify(cogs, ["\n"], shorten_by=16):
await ctx.send(box(page.lstrip(" "), lang="diff"))
@cog.command(name="info")
async def _cog_info(self, ctx, repo_name: Repo, cog_name: str):
@ -388,7 +389,9 @@ class Downloader:
msg = _("Information on {}:\n{}").format(cog.name, cog.description or "")
await ctx.send(box(msg))
async def is_installed(self, cog_name: str) -> (bool, Union[Installable, None]):
async def is_installed(
self, cog_name: str
) -> Union[Tuple[bool, Installable], Tuple[bool, None]]:
"""Check to see if a cog has been installed through Downloader.
Parameters