mirror of
https://github.com/myned/modufur.git
synced 2024-11-01 13:02:38 +00:00
Fix formatter.paginate sorted output, change formatting
This commit is contained in:
parent
3f5e627524
commit
85fef7983e
1 changed files with 3 additions and 4 deletions
|
@ -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 = {' ': ' '}
|
||||
|
|
Loading…
Reference in a new issue