style: format nested list comprehension for better readability

This commit is contained in:
Paul Gauthier (aider) 2024-10-25 16:09:17 -07:00
parent 14a62586cc
commit ec00bb988c

View file

@ -378,8 +378,20 @@ class InputOutput:
if changed: if changed:
dump(changed) dump(changed)
# Check if any values contain ! # Check if any values contain !
if any('!' in comment for comments in changed.values() if comments for comment in comments): if any(
self.changed_files = ['\n'.join(comment for comments in changed.values() if comments for comment in comments)] "!" in comment
for comments in changed.values()
if comments
for comment in comments
):
self.changed_files = [
"\n".join(
comment
for comments in changed.values()
if comments
for comment in comments
)
]
else: else:
self.changed_files = list(changed.keys()) self.changed_files = list(changed.keys())
self.interrupt_input() self.interrupt_input()