mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 17:55:01 +00:00
Replace valid_formats
with dynamically generated list of coder.__all__
entries with edit_format
attribute
This commit is contained in:
parent
c9003c598f
commit
7f028eeb1e
1 changed files with 1 additions and 1 deletions
|
@ -48,7 +48,7 @@ class Commands:
|
|||
"Switch to a new editing mode"
|
||||
|
||||
ef = args.strip()
|
||||
valid_formats = "diff udiff whole".split()
|
||||
valid_formats = [coder.__name__ for coder in self.coder.__all__ if hasattr(coder, 'edit_format')]
|
||||
|
||||
if ef not in valid_formats:
|
||||
self.io.tool_error(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue