Align class docstrings in a column when printing valid formats

This commit is contained in:
Your Name (aider) 2024-07-28 20:24:05 -03:00
parent 8c3fe1650b
commit 98984564d6

View file

@ -61,8 +61,9 @@ class Commands:
else:
self.io.tool_error(f"Edit format must be one of:")
max_format_length = max(len(format) for format, _ in valid_formats)
for format, description in valid_formats:
self.io.tool_error(f"- {format}: {description}")
self.io.tool_error(f"- {format:<{max_format_length}} : {description}")
return
raise SwitchCoder(edit_format=ef)