mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 09:44:59 +00:00
style: Apply linter fixes
This commit is contained in:
parent
b0acc95b01
commit
1c7db4da0d
1 changed files with 8 additions and 8 deletions
|
@ -26,8 +26,8 @@ from prompt_toolkit.shortcuts import CompleteStyle, PromptSession
|
||||||
from prompt_toolkit.styles import Style
|
from prompt_toolkit.styles import Style
|
||||||
from pygments.lexers import MarkdownLexer, guess_lexer_for_filename
|
from pygments.lexers import MarkdownLexer, guess_lexer_for_filename
|
||||||
from pygments.token import Token
|
from pygments.token import Token
|
||||||
from rich.columns import Columns
|
|
||||||
from rich.color import ColorParseError
|
from rich.color import ColorParseError
|
||||||
|
from rich.columns import Columns
|
||||||
from rich.console import Console
|
from rich.console import Console
|
||||||
from rich.markdown import Markdown
|
from rich.markdown import Markdown
|
||||||
from rich.style import Style as RichStyle
|
from rich.style import Style as RichStyle
|
||||||
|
@ -386,7 +386,7 @@ class InputOutput:
|
||||||
RichStyle(color=color_value)
|
RichStyle(color=color_value)
|
||||||
except ColorParseError as e:
|
except ColorParseError as e:
|
||||||
self.console.print(
|
self.console.print(
|
||||||
f"[bold red]Warning:[/bold red] Invalid configuration for"
|
"[bold red]Warning:[/bold red] Invalid configuration for"
|
||||||
f" {attr_name}: '{color_value}'. {e}. Disabling this color."
|
f" {attr_name}: '{color_value}'. {e}. Disabling this color."
|
||||||
)
|
)
|
||||||
setattr(self, attr_name, None) # Reset invalid color to None
|
setattr(self, attr_name, None) # Reset invalid color to None
|
||||||
|
@ -598,7 +598,7 @@ class InputOutput:
|
||||||
edited_text = pipe_editor(input_data=current_text)
|
edited_text = pipe_editor(input_data=current_text)
|
||||||
|
|
||||||
# Replace the buffer with the edited text, strip any trailing newlines
|
# Replace the buffer with the edited text, strip any trailing newlines
|
||||||
buffer.text = edited_text.rstrip('\n')
|
buffer.text = edited_text.rstrip("\n")
|
||||||
|
|
||||||
# Move cursor to the end of the text
|
# Move cursor to the end of the text
|
||||||
buffer.cursor_position = len(buffer.text)
|
buffer.cursor_position = len(buffer.text)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue