mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 22:28:24 +02:00
seq_as_rst: Sort "Choices" so they are consistently formatted
This commit is contained in:
@@ -454,7 +454,7 @@ def seq_as_rst(seq, usage, message, appname, heading_char='-'):
|
|||||||
if defval is not None:
|
if defval is not None:
|
||||||
a(textwrap.indent('Default: :code:`{}`'.format(defval), ' ' * 4))
|
a(textwrap.indent('Default: :code:`{}`'.format(defval), ' ' * 4))
|
||||||
if 'choices' in opt:
|
if 'choices' in opt:
|
||||||
a(textwrap.indent('Choices: :code:`{}`'.format(', '.join(opt['choices'])), ' ' * 4))
|
a(textwrap.indent('Choices: :code:`{}`'.format(', '.join(sorted(opt['choices']))), ' ' * 4))
|
||||||
a('')
|
a('')
|
||||||
|
|
||||||
text = '\n'.join(blocks)
|
text = '\n'.join(blocks)
|
||||||
|
|||||||
Reference in New Issue
Block a user