From 9a673d62332cd1b5b1445cd3a36bcef6ead5cc5b Mon Sep 17 00:00:00 2001 From: Dylan Dizon Date: Thu, 15 Nov 2018 15:33:34 -0500 Subject: [PATCH] Fix formatter.paginate logic issues --- 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 f089370..c4f8ab2 100644 --- a/src/utils/formatter.py +++ b/src/utils/formatter.py @@ -42,12 +42,11 @@ async def paginate( paginator.add_line(start) if type(i) in (tuple, list, set): - for e in sorted(i): - if e and (e not in i) and (len(i) > 1): - paginator.add_line(eprefix + f'{ejoin}'.join(e) + esuffix) + paginator.add_line(eprefix + f'{ejoin}'.join(i) + esuffix) + elif type(i) is dict: for k, e in sorted(i.items()): - if e and (k not in e) and (len(e) > 1): + if e and (k not in e) and (len(e) >= 1): paginator.add_line(kprefix + k + ksuffix + eprefix + f'{ejoin}'.join(e) + esuffix) if end: