1
0
Fork 0
mirror of https://github.com/myned/modufur.git synced 2024-12-23 22:27:27 +00:00

Fix formatter.paginate sorted output, change formatting

This commit is contained in:
Myned 2019-01-18 11:35:34 -05:00
parent 3f5e627524
commit 85fef7983e

View file

@ -39,16 +39,15 @@ async def paginate(
end=''):
paginator = Paginator(prefix=prefix, suffix=suffix)
messages = []
i = sorted(copy.deepcopy(i))
i = copy.deepcopy(i)
if start:
paginator.add_line(start)
paginator.add_line(start + ('' if type(i) is not dict else '\n'))
if type(i) in (tuple, list, set):
if not i:
i = (' ')
paginator.add_line(eprefix + f'{ejoin}'.join(i) + esuffix)
paginator.add_line(eprefix + f'{ejoin}'.join(sorted(i)) + esuffix)
elif type(i) is dict:
if not i:
i = {' ': ' '}