From 85fef7983e9eb693357e2a6aa182450a55e52cfd Mon Sep 17 00:00:00 2001 From: Myned Date: Fri, 18 Jan 2019 11:35:34 -0500 Subject: [PATCH] Fix formatter.paginate sorted output, change formatting --- src/utils/formatter.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/utils/formatter.py b/src/utils/formatter.py index 9c274aa..d7950a7 100644 --- a/src/utils/formatter.py +++ b/src/utils/formatter.py @@ -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 = {' ': ' '}